Skip to content

Commit 36efde5

Browse files
committed
feat: off dot-notation
1 parent 6549e53 commit 36efde5

File tree

13 files changed

+27
-10
lines changed

13 files changed

+27
-10
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"scripts": {
2222
"prepare": "husky install",
23-
"setup": "lerna bootstrap --no-ci && lerna link",
23+
"setup": "rm -rf ./packages/*/node_modules && lerna bootstrap --no-ci && lerna link",
2424
"lint": "eslint --ext .js,.jsx,.tsx,.ts ./ --resolve-plugins-relative-to ./packages/spec",
2525
"prettier": "prettier **/* --write",
2626
"test": "jest && cd packages/spec && npm run test",

packages/eslint-plugin-best-practices/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# changelog
22

3+
## 0.2.10
4+
- Update stylistic rules `dot-notation` and `@typescript-eslint/dot-notation` from error to off.
5+
36
## 0.2.9
47

58
- Update stylistic rules `semi` `eol-last` and `quote-props` from error to warn.

packages/eslint-plugin-best-practices/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iceworks/eslint-plugin-best-practices",
3-
"version": "0.2.9",
3+
"version": "0.2.10",
44
"description": "Iceworks best practices eslint plugin.",
55
"files": [
66
"docs/",

packages/eslint-plugin-best-practices/src/configs/common.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ module.exports = {
2727
},
2828
],
2929
rules: {
30+
'dot-notation': 'off',
3031
'max-len': ['warn', 120, 2, {
3132
ignoreUrls: true,
3233
ignoreComments: false,
3334
ignoreRegExpLiterals: true,
3435
ignoreStrings: true,
3536
ignoreTemplateLiterals: true,
3637
}],
37-
semi: 'warn',
38+
'semi': 'warn',
3839
'eol-last': 'warn',
3940
'quote-props': 'warn',
4041
'@iceworks/best-practices/no-http-url': 'warn',

packages/eslint-plugin-best-practices/src/configs/rax-ts.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module.exports = deepmerge(commonConfig, {
66
'max-lines': ['warn', { max: 500 }],
77
'no-plusplus': 'off',
88
'no-return-await': 'off',
9-
semi: 'off',
9+
'semi': 'off',
10+
'@typescript-eslint/dot-notation': 'off',
1011
'@typescript-eslint/semi': 'warn',
1112
'@typescript-eslint/no-unused-vars': 'warn',
1213
},

packages/eslint-plugin-best-practices/src/configs/react-ts.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ module.exports = deepmerge(commonConfig, {
88
'no-plusplus': 'off',
99
'no-return-await': 'off',
1010
'react/prop-types': 'off',
11-
semi: 'off',
11+
'semi': 'off',
12+
'@typescript-eslint/dot-notation': 'off',
1213
'@typescript-eslint/semi': 'warn',
1314
'@typescript-eslint/no-unused-vars': 'warn',
1415
},

packages/spec/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## 1.5.0
44

5-
- Feat update eslint-config-ali、babel and typescript dependencies to support [email protected]
5+
- Feat update eslint-config-ali、babel and typescript dependencies to support [email protected].
6+
- Update stylistic rules `dot-notation` and `@typescript-eslint/dot-notation` from error to off.
67

78
## 1.4.2
89

packages/spec/examples/common-ts/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ interface AppDeveloper {
55

66
const bar = [1, 2];
77
const one: AppDeveloper = { name: 'hello', id: 1 };
8+
9+
const t = { s: 1 };
10+
console.log(t['s']);
+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
const foo = [1, 2];
22
console.log(foo);
3+
4+
const t = { s: 1 };
5+
console.log(t['s']);

packages/spec/src/eslint/common-ts.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ module.exports = {
66
],
77
rules: {
88
// Change error to warn
9-
semi: 'off',
9+
'semi': 'off',
1010
'@typescript-eslint/semi': 'warn',
1111
'eol-last': 'warn',
1212
'quote-props': 'warn',
1313
'@typescript-eslint/no-unused-vars': 'warn',
14+
'@typescript-eslint/dot-notation': 'off',
1415
},
1516
};

packages/spec/src/eslint/common.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ module.exports = {
66
],
77
rules: {
88
// Change error to warn
9-
semi: 'warn',
9+
'semi': 'warn',
1010
'eol-last': 'warn',
1111
'quote-props': 'warn',
1212
'no-unused-vars': 'warn',
13+
'dot-notation': 'off',
1314
},
1415
};

packages/spec/src/eslint/vue-ts.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ module.exports = {
66
],
77
rules: {
88
// Change error to warn
9-
semi: 'off',
9+
'semi': 'off',
1010
'@typescript-eslint/semi': 'warn',
1111
'eol-last': 'warn',
1212
'quote-props': 'warn',
1313
'@typescript-eslint/no-unused-vars': 'warn',
14+
'@typescript-eslint/dot-notation': 'off',
1415
},
1516
};

packages/spec/src/eslint/vue.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ module.exports = {
66
],
77
rules: {
88
// Change error to warn
9-
semi: 'warn',
9+
'semi': 'warn',
1010
'eol-last': 'warn',
1111
'quote-props': 'warn',
1212
'no-unused-vars': 'warn',
13+
'dot-notation': 'off',
1314
},
1415
};

0 commit comments

Comments
 (0)