@bigcommerce/eslint-config 2.0.0-alpha.8 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/configs/react.js +9 -0
- package/configs/typescript.js +29 -0
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -37,6 +37,19 @@ running CI with:
|
|
|
37
37
|
eslint --max-warnings 0
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
## Usage with Next.js
|
|
41
|
+
|
|
42
|
+
Make sure to also extend from next's `core-web-vitals`.
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
// .eslintrc.js
|
|
46
|
+
require('@bigcommerce/eslint-config/patch');
|
|
47
|
+
|
|
48
|
+
module.exports = {
|
|
49
|
+
extends: ['@bigcommerce/eslint-config', 'next/core-web-vitals'],
|
|
50
|
+
};
|
|
51
|
+
```
|
|
52
|
+
|
|
40
53
|
## Release
|
|
41
54
|
|
|
42
55
|
Please refer to the documentation of [lerna](https://github.com/lerna/lerna) for release options.
|
package/configs/react.js
CHANGED
|
@@ -29,6 +29,15 @@ module.exports = {
|
|
|
29
29
|
'react/jsx-sort-props': 'warn',
|
|
30
30
|
'react/no-redundant-should-component-update': 'error',
|
|
31
31
|
'react/no-this-in-sfc': 'error',
|
|
32
|
+
'react/no-unescaped-entities': [
|
|
33
|
+
'error',
|
|
34
|
+
{
|
|
35
|
+
forbid: [
|
|
36
|
+
{ alternatives: ['>'], char: '>' },
|
|
37
|
+
{ alternatives: ['}'], char: '}' },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
32
41
|
'react/no-unsafe': 'error',
|
|
33
42
|
'react/no-unused-state': 'error',
|
|
34
43
|
'react/prefer-es6-class': 'error',
|
package/configs/typescript.js
CHANGED
|
@@ -109,6 +109,34 @@ module.exports = {
|
|
|
109
109
|
],
|
|
110
110
|
'@typescript-eslint/no-use-before-define': ['error', 'nofunc'],
|
|
111
111
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
112
|
+
'@typescript-eslint/padding-line-between-statements': [
|
|
113
|
+
'warn',
|
|
114
|
+
{
|
|
115
|
+
blankLine: 'always',
|
|
116
|
+
next: 'return',
|
|
117
|
+
prev: '*',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
blankLine: 'always',
|
|
121
|
+
next: ['block', 'block-like', 'class', 'const', 'let', 'var', 'interface'],
|
|
122
|
+
prev: '*',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
blankLine: 'always',
|
|
126
|
+
next: '*',
|
|
127
|
+
prev: ['block', 'block-like', 'class', 'const', 'let', 'var', 'interface'],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
blankLine: 'any',
|
|
131
|
+
next: ['const', 'let', 'var'],
|
|
132
|
+
prev: ['const', 'let', 'var'],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
blankLine: 'any',
|
|
136
|
+
next: ['case'],
|
|
137
|
+
prev: ['case'],
|
|
138
|
+
},
|
|
139
|
+
],
|
|
112
140
|
'@typescript-eslint/prefer-for-of': 'error',
|
|
113
141
|
'@typescript-eslint/prefer-function-type': 'error',
|
|
114
142
|
'@typescript-eslint/require-await': 'error',
|
|
@@ -128,6 +156,7 @@ module.exports = {
|
|
|
128
156
|
'no-unused-vars': 'off',
|
|
129
157
|
'no-use-before-define': 'off',
|
|
130
158
|
'no-useless-constructor': 'off',
|
|
159
|
+
'padding-line-between-statements': 'off',
|
|
131
160
|
'sort-keys': 'off',
|
|
132
161
|
},
|
|
133
162
|
settings: {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcommerce/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Default ESLint configuration used at BigCommerce",
|
|
5
|
-
"main": "index.
|
|
5
|
+
"main": "index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"index.js",
|
|
8
8
|
"configs",
|
|
@@ -20,29 +20,29 @@
|
|
|
20
20
|
"directory": "packages/eslint-config"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@bigcommerce/eslint-plugin": "^1.
|
|
24
|
-
"@rushstack/eslint-patch": "^1.0
|
|
25
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
26
|
-
"@typescript-eslint/parser": "^
|
|
23
|
+
"@bigcommerce/eslint-plugin": "^1.1.0",
|
|
24
|
+
"@rushstack/eslint-patch": "^1.1.0",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
|
26
|
+
"@typescript-eslint/parser": "^5.3.1",
|
|
27
27
|
"eslint-config-prettier": "^8.3.0",
|
|
28
|
-
"eslint-import-resolver-typescript": "^2.
|
|
29
|
-
"eslint-plugin-gettext": "^1.
|
|
30
|
-
"eslint-plugin-import": "^2.
|
|
31
|
-
"eslint-plugin-jest": "^
|
|
28
|
+
"eslint-import-resolver-typescript": "^2.5.0",
|
|
29
|
+
"eslint-plugin-gettext": "^1.2.0",
|
|
30
|
+
"eslint-plugin-import": "^2.25.3",
|
|
31
|
+
"eslint-plugin-jest": "^25.2.4",
|
|
32
32
|
"eslint-plugin-jest-formatting": "^3.0.0",
|
|
33
|
-
"eslint-plugin-jsdoc": "^
|
|
34
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
35
|
-
"eslint-plugin-prettier": "^
|
|
36
|
-
"eslint-plugin-react": "^7.
|
|
37
|
-
"eslint-plugin-react-hooks": "^4.
|
|
33
|
+
"eslint-plugin-jsdoc": "^37.0.3",
|
|
34
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
35
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
36
|
+
"eslint-plugin-react": "^7.27.0",
|
|
37
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
38
38
|
"eslint-plugin-switch-case": "^1.1.2",
|
|
39
|
-
"prettier": "^2.
|
|
39
|
+
"prettier": "^2.4.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"react": "^17.0.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"eslint": "^
|
|
45
|
+
"eslint": "^8.0.0",
|
|
46
46
|
"typescript": "^4.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"optional": true
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "bed5717b06798af8117a216e5d8498d2aa96c7ee"
|
|
54
54
|
}
|