@mscharley/eslint-config 3.1.1 → 3.1.3
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 +21 -0
- package/README.md +13 -4
- package/package.json +7 -11
- package/partials/eslint.js +1 -1
- package/partials/style.js +8 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Change Log - @mscharley/eslint-config
|
|
2
2
|
|
|
3
|
+
## 3.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6e298f0: Migrate to `n/no-process-exit` instead of the deprecated `no-process-exit` rule
|
|
8
|
+
- 7d74015: fix(deps): update typescript-eslint monorepo to ^7.5.0
|
|
9
|
+
- 0951542: fix(deps): update dependency typescript to v5.4.4
|
|
10
|
+
- f39ccd3: fix(deps): update typescript-eslint monorepo to ^7.6.0
|
|
11
|
+
- 93bf6c6: fix(deps): update dependency typescript to v5.4.5
|
|
12
|
+
- c5c49af: fix(deps): update dependency @stylistic/eslint-plugin to ^1.7.2
|
|
13
|
+
- 71c43a3: fix(deps): update typescript-eslint monorepo to ^7.7.0
|
|
14
|
+
- 7aef700: fix(deps): update typescript-eslint monorepo to ^7.7.1
|
|
15
|
+
- c21caaa: fix(deps): update dependency eslint-plugin-react-hooks to ^4.6.1
|
|
16
|
+
|
|
17
|
+
## 3.1.2
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- ada7204: fix(deps): update dependency eslint-plugin-n to v16
|
|
22
|
+
- 3f7617a: Don't use prettier for ts/js
|
|
23
|
+
|
|
3
24
|
## 3.1.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ This is a preset for eslint for use with TypeScript or JavaScript projects.
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
```console
|
|
17
|
-
$ npm install --save-dev @mscharley/eslint-config
|
|
17
|
+
$ npm install --save-dev @mscharley/eslint-config
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
@@ -31,9 +31,18 @@ module.exports = {
|
|
|
31
31
|
};
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
### Notes on Prettier
|
|
35
|
+
|
|
36
|
+
If using Prettier to format files other than TypeScript and JavaScript files then you should ignore all TS/JS files to prevent ESLint and Prettier from fighting with each other.
|
|
37
|
+
|
|
38
|
+
```ignore
|
|
39
|
+
# .prettierignore
|
|
40
|
+
**/*.cts
|
|
41
|
+
**/*.mts
|
|
42
|
+
**/*.ts
|
|
43
|
+
**/*.cjs
|
|
44
|
+
**/*.mjs
|
|
45
|
+
**/*.js
|
|
37
46
|
```
|
|
38
47
|
|
|
39
48
|
## Extras
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mscharley/eslint-config",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"provenance": true
|
|
6
6
|
},
|
|
@@ -27,21 +27,17 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/mscharley/node-presets#readme",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@typescript-eslint/
|
|
33
|
-
"@typescript-eslint/parser": "^7.4.0",
|
|
30
|
+
"@stylistic/eslint-plugin": "^1.7.2",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
32
|
+
"@typescript-eslint/parser": "^7.7.1",
|
|
34
33
|
"eslint": "^8.57.0",
|
|
35
|
-
"eslint-config-prettier": "^9.1.0",
|
|
36
34
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
37
35
|
"eslint-plugin-deprecation": "^2.0.0",
|
|
38
36
|
"eslint-plugin-import": "^2.29.1",
|
|
39
37
|
"eslint-plugin-jest": "^27.9.0",
|
|
40
|
-
"eslint-plugin-n": "^
|
|
41
|
-
"eslint-plugin-prettier": "^5.1.3",
|
|
38
|
+
"eslint-plugin-n": "^16.6.2",
|
|
42
39
|
"eslint-plugin-react": "^7.34.1",
|
|
43
|
-
"eslint-plugin-react-hooks": "^4.6.
|
|
44
|
-
"
|
|
45
|
-
"typescript": "^5.4.3"
|
|
40
|
+
"eslint-plugin-react-hooks": "^4.6.1",
|
|
41
|
+
"typescript": "^5.4.5"
|
|
46
42
|
}
|
|
47
43
|
}
|
package/partials/eslint.js
CHANGED
package/partials/style.js
CHANGED
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
const stylistic = require('@stylistic/eslint-plugin');
|
|
2
2
|
|
|
3
|
-
const prettierConfig = require('@mscharley/prettier-config');
|
|
4
|
-
const TAB_WIDTH = 2;
|
|
5
3
|
const customized = stylistic.configs.customize({
|
|
6
4
|
flat: false,
|
|
7
|
-
indent:
|
|
8
|
-
quotes:
|
|
9
|
-
semi:
|
|
5
|
+
indent: 'tab',
|
|
6
|
+
quotes: 'single',
|
|
7
|
+
semi: true,
|
|
10
8
|
jsx: true,
|
|
11
9
|
commaDangle: 'always-multiline',
|
|
12
|
-
quoteProps:
|
|
13
|
-
arrowParens:
|
|
10
|
+
quoteProps: 'always',
|
|
11
|
+
arrowParens: true,
|
|
14
12
|
braceStyle: '1tbs',
|
|
15
13
|
});
|
|
16
14
|
|
|
17
15
|
module.exports = {
|
|
18
|
-
plugins: ['@stylistic'
|
|
16
|
+
plugins: ['@stylistic'],
|
|
19
17
|
extends: ['plugin:@stylistic/disable-legacy'],
|
|
20
18
|
rules: {
|
|
21
|
-
'prettier/prettier': ['error', prettierConfig],
|
|
22
19
|
...customized.rules,
|
|
23
20
|
'@stylistic/generator-star-spacing': ['error', 'after'],
|
|
24
|
-
'@stylistic/linebreak-style': ['error',
|
|
21
|
+
'@stylistic/linebreak-style': ['error', 'unix'],
|
|
25
22
|
'@stylistic/quotes': [
|
|
26
23
|
'error',
|
|
27
24
|
customized.rules['@stylistic/quotes'][1],
|
|
28
25
|
{ avoidEscape: true, allowTemplateLiterals: false },
|
|
29
26
|
],
|
|
27
|
+
'@stylistic/quote-props': ['error', 'consistent-as-needed'],
|
|
30
28
|
},
|
|
31
29
|
};
|