@etchteam/eslint-config 1.1.2 → 1.3.0
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/.vscode/settings.json +4 -0
- package/CHANGELOG.md +9 -4
- package/README.md +2 -2
- package/package.json +3 -2
- package/prettier.config.js +3 -0
- package/src/index.js +24 -15
package/.vscode/settings.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
## [1.
|
|
1
|
+
## [1.3.0](https://github.com/etchteam/eslint/compare/v1.2.0...v1.3.0) (2023-07-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add a11y linting ([aab79f9](https://github.com/etchteam/eslint/commit/aab79f9eda8264d17ace31f7fa9dfaaf424ffb2b))
|
|
7
|
+
* add prettier config and fixes ([6551c49](https://github.com/etchteam/eslint/commit/6551c49231192e42949c48576e89d63f2f32b25b))
|
|
8
|
+
* add sonarcloud link ([e3d2643](https://github.com/etchteam/eslint/commit/e3d2643b021ae785f67471166bd5eb7627d00457))
|
|
2
9
|
|
|
3
10
|
|
|
4
11
|
### Bug Fixes
|
|
5
12
|
|
|
6
|
-
*
|
|
7
|
-
* **[skip release]:** remove review requests, as we manually ask for them ([a272223](https://github.com/etchteam/eslint/commit/a2722237889c2fc1792d72978679cf905773eaca))
|
|
8
|
-
* use the correct syntax for prettier rules ([be6766c](https://github.com/etchteam/eslint/commit/be6766ca15d5f5264a860442206f2d5492226e32))
|
|
13
|
+
* disable detect-object-injection (too many false positives) ([ea68c48](https://github.com/etchteam/eslint/commit/ea68c48e466e21ce090c76ea29653345dc32865e))
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ The eslint config that we use at [Etch](https://etch.co)
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm
|
|
8
|
+
npm i -D eslint prettier @etchteam/eslint-config
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
@@ -21,7 +21,7 @@ echo "module.exports = { extends: ['@etchteam'] };" > .eslintrc.js
|
|
|
21
21
|
Run the following:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm
|
|
24
|
+
npm i -D husky lint-staged
|
|
25
25
|
|
|
26
26
|
echo "module.exports = { '*.{ts,tsx,js,jsx}': 'eslint --fix' };" > lint-staged.config.js
|
|
27
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etchteam/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Etch's standard eslint config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -33,9 +33,10 @@
|
|
|
33
33
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
|
34
34
|
"@typescript-eslint/parser": "^5.46.1",
|
|
35
35
|
"eslint": "^8.29.0",
|
|
36
|
-
"eslint-config-next": "^13.
|
|
36
|
+
"eslint-config-next": "^13.4.5",
|
|
37
37
|
"eslint-config-prettier": "^8.5.0",
|
|
38
38
|
"eslint-plugin-import": "^2.26.0",
|
|
39
|
+
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
39
40
|
"eslint-plugin-prettier": "^4.2.1",
|
|
40
41
|
"eslint-plugin-security": "^1.5.0",
|
|
41
42
|
"eslint-plugin-storybook": "^0.6.8",
|
package/src/index.js
CHANGED
|
@@ -7,6 +7,7 @@ module.exports = {
|
|
|
7
7
|
'plugin:import/recommended',
|
|
8
8
|
'plugin:import/typescript',
|
|
9
9
|
'plugin:prettier/recommended',
|
|
10
|
+
'plugin:jsx-a11y/strict',
|
|
10
11
|
],
|
|
11
12
|
plugins: ['unused-imports'],
|
|
12
13
|
parser: '@typescript-eslint/parser',
|
|
@@ -15,27 +16,35 @@ module.exports = {
|
|
|
15
16
|
'@typescript-eslint/no-unused-vars': 'error',
|
|
16
17
|
'unused-imports/no-unused-imports': 'error',
|
|
17
18
|
'unused-imports/no-unused-vars': 'off',
|
|
18
|
-
'import/order': [
|
|
19
|
-
'
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
'import/order': [
|
|
20
|
+
'error',
|
|
21
|
+
{
|
|
22
|
+
'newlines-between': 'always',
|
|
23
|
+
alphabetize: {
|
|
24
|
+
order: 'asc',
|
|
25
|
+
},
|
|
26
|
+
pathGroups: [
|
|
27
|
+
{
|
|
28
|
+
pattern: '@/**',
|
|
29
|
+
group: 'parent',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
22
32
|
},
|
|
23
|
-
|
|
24
|
-
pattern: '@/**',
|
|
25
|
-
group: 'parent'
|
|
26
|
-
}]
|
|
27
|
-
}],
|
|
33
|
+
],
|
|
28
34
|
'prettier/prettier': [
|
|
29
35
|
'error',
|
|
30
36
|
{
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
]
|
|
37
|
+
singleQuote: true,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
'jsx-a11y/anchor-ambiguous-text': 'error',
|
|
41
|
+
'jsx-a11y/no-aria-hidden-on-focusable': 'error',
|
|
42
|
+
'security/detect-object-injection': 'off',
|
|
34
43
|
},
|
|
35
44
|
settings: {
|
|
36
45
|
'import/resolver': {
|
|
37
46
|
typescript: true,
|
|
38
|
-
node: true
|
|
39
|
-
}
|
|
40
|
-
}
|
|
47
|
+
node: true,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
41
50
|
};
|