@etchteam/eslint-config 1.7.1 → 1.8.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/CHANGELOG.md +4 -3
- package/README.md +2 -2
- package/package.json +5 -3
- package/src/index.js +3 -0
- package/.eslintrc.js +0 -34
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
## [1.
|
|
1
|
+
## [1.8.0](https://github.com/etchteam/eslint/compare/v1.7.1...v1.8.0) (2023-12-06)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* add json and yaml linting ([c1354f8](https://github.com/etchteam/eslint/commit/c1354f8c1006bfe347c5048298caccb58923d2e9))
|
|
7
|
+
* use a symlink so we use our own linter to lint our linter ([afea6ba](https://github.com/etchteam/eslint/commit/afea6ba0cf6efd70aeca378d192684e9107a4968))
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Run the following:
|
|
|
23
23
|
```bash
|
|
24
24
|
npm i -D husky lint-staged
|
|
25
25
|
|
|
26
|
-
echo "module.exports = { '*.{ts,tsx,js,jsx}': 'eslint --fix' };" > lint-staged.config.js
|
|
26
|
+
echo "module.exports = { '*.{ts,tsx,js,jsx,yml,yaml,json}': 'eslint --fix' };" > lint-staged.config.js
|
|
27
27
|
|
|
28
28
|
npx husky install
|
|
29
29
|
|
|
@@ -35,7 +35,7 @@ npx husky set .husky/pre-commit "npx --no-install -- lint-staged"
|
|
|
35
35
|
|
|
36
36
|
Add the following to your lint-staged config:
|
|
37
37
|
|
|
38
|
-
`'*.{ts,tsx,js,jsx}': 'eslint --fix'`
|
|
38
|
+
`'*.{ts,tsx,js,jsx,yml,yaml,json}': 'eslint --fix'`
|
|
39
39
|
|
|
40
40
|
## Usage with VSCode
|
|
41
41
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etchteam/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Etch's standard eslint config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,17 +32,19 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
|
34
34
|
"@typescript-eslint/parser": "^6.9.1",
|
|
35
|
-
"eslint": "
|
|
35
|
+
"eslint": ">=8.29.0",
|
|
36
36
|
"eslint-config-next": "^14.0.1",
|
|
37
37
|
"eslint-config-prettier": "^9.0.0",
|
|
38
38
|
"eslint-plugin-import": "^2.29.0",
|
|
39
|
+
"eslint-plugin-json": "^3.1.0",
|
|
39
40
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
40
41
|
"eslint-plugin-prettier": "^5.0.1",
|
|
41
42
|
"eslint-plugin-react": "^7.33.2",
|
|
42
43
|
"eslint-plugin-security": "^1.7.1",
|
|
43
44
|
"eslint-plugin-storybook": "^0.6.15",
|
|
44
45
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
45
|
-
"
|
|
46
|
+
"eslint-plugin-yml": "^1.10.0",
|
|
47
|
+
"prettier": ">=3.0.0"
|
|
46
48
|
},
|
|
47
49
|
"peerDependencies": {
|
|
48
50
|
"eslint": ">=8.29.0",
|
package/src/index.js
CHANGED
|
@@ -8,6 +8,9 @@ module.exports = {
|
|
|
8
8
|
'plugin:import/typescript',
|
|
9
9
|
'plugin:prettier/recommended',
|
|
10
10
|
'plugin:jsx-a11y/strict',
|
|
11
|
+
'plugin:json/recommended',
|
|
12
|
+
'plugin:yml/standard',
|
|
13
|
+
'plugin:yml/prettier',
|
|
11
14
|
],
|
|
12
15
|
plugins: ['unused-imports'],
|
|
13
16
|
parser: '@typescript-eslint/parser',
|
package/.eslintrc.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: [
|
|
3
|
-
'next/core-web-vitals',
|
|
4
|
-
'plugin:@typescript-eslint/recommended',
|
|
5
|
-
'plugin:storybook/recommended',
|
|
6
|
-
'plugin:security/recommended',
|
|
7
|
-
'plugin:import/recommended',
|
|
8
|
-
'plugin:import/typescript',
|
|
9
|
-
'plugin:prettier/recommended',
|
|
10
|
-
],
|
|
11
|
-
plugins: ['unused-imports'],
|
|
12
|
-
parser: '@typescript-eslint/parser',
|
|
13
|
-
rules: {
|
|
14
|
-
'no-unused-vars': 'off',
|
|
15
|
-
'@typescript-eslint/no-unused-vars': 'error',
|
|
16
|
-
'unused-imports/no-unused-imports': 'error',
|
|
17
|
-
'unused-imports/no-unused-vars': 'off',
|
|
18
|
-
'import/order': ['error', {
|
|
19
|
-
'newlines-between': 'always',
|
|
20
|
-
alphabetize: {
|
|
21
|
-
order: 'asc'
|
|
22
|
-
},
|
|
23
|
-
}],
|
|
24
|
-
},
|
|
25
|
-
settings: {
|
|
26
|
-
'import/resolver': {
|
|
27
|
-
typescript: true,
|
|
28
|
-
node: true
|
|
29
|
-
},
|
|
30
|
-
'prettier/prettier': {
|
|
31
|
-
singleQuote: true,
|
|
32
|
-
},
|
|
33
|
-
}
|
|
34
|
-
};
|