Skip to content
This repository was archived by the owner on Jun 29, 2025. It is now read-only.

Commit 43a042c

Browse files
phil-rwtclindner
authored andcommitted
vuex-no-param-reassign (#48)
1 parent 84c43e3 commit 43a042c

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
const vue = require.resolve('./rules/vue');
21
const a11y = require.resolve('./rules/a11y');
2+
const vue = require.resolve('./rules/vue');
3+
const vuex = require.resolve('./rules/vuex');
34

45
module.exports = {
5-
extends: ['plugin:vue/recommended', vue, a11y],
6+
extends: ['plugin:vue/recommended', a11y, vue, vuex],
67
parserOptions: {
78
parser: 'babel-eslint'
89
},

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-vue-tc",
3-
"version": "2.0.1",
3+
"version": "2.1.0",
44
"description": "ESLint shareable config for Vue projects",
55
"keywords": [
66
"eslintconfig",

rules/vuex.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
rules: {
3+
'no-param-reassign': [
4+
'error',
5+
{
6+
props: true,
7+
ignorePropertyModificationsFor: [
8+
// vuex
9+
'state'
10+
]
11+
}
12+
]
13+
}
14+
};

0 commit comments

Comments
 (0)