linter-bundle 2.3.1 → 2.4.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 +19 -1
- package/eslint/index.js +2 -2
- package/eslint/overrides-jest.js +2 -1
- package/eslint/overrides-react.js +13 -0
- package/eslint/overrides-type-declarations.js +1 -0
- package/package.json +10 -10
- package/stylelint/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.
|
|
9
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.4.0...HEAD)
|
|
10
|
+
|
|
11
|
+
## [2.4.0] - 2022.02.09
|
|
12
|
+
|
|
13
|
+
- [eslint] Updated `@typescript-eslint/eslint-plugin` from v5.10.1 to v5.11.0
|
|
14
|
+
- [eslint] Updated `eslint` from v8.7.0 to v8.8.0
|
|
15
|
+
- [eslint] Updated `eslint-plugin-functional` from v4.1.1 to v4.2.0
|
|
16
|
+
- [eslint] Updated `eslint-plugin-jest` from v26.0.0 to v26.1.0
|
|
17
|
+
- [eslint] Updated `eslint-plugin-jsdoc` from v37.7.0 to v37.8.1
|
|
18
|
+
- [markdownlint] Updated `markdownlint-cli` from v0.30.0 to v0.31.1, which adds the new rules `MD049` and `MD050` for consistent emphasis/strong style, and improves the rules `MD007`/`MD010`/`MD032`/`MD033`/`MD035`/`MD037`/`MD039`
|
|
19
|
+
- [stylelint] Updated `stylelint` from v14.3.0 to v14.4.0
|
|
20
|
+
- [eslint] Activated `unusedExports` option of the [`import/no-unused-modules`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.md) rule
|
|
21
|
+
- [eslint] Activate [`@typescript-eslint/explicit-function-return-type`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md) rule
|
|
22
|
+
- [eslint/react] Add React class methods (`componentDidMount`, `render` etc.) to the allowed names in the [`@typescript-eslint/explicit-function-return-type`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md) rule
|
|
23
|
+
- [eslint/jest] Make use of new [`no-conditional-in-test`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-conditional-in-test.md) rule, which deprecates `no-if`
|
|
24
|
+
- [eslint/jest] Make use of new [`prefer-snapshot-hint`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-snapshot-hint.md) rule
|
|
25
|
+
- [stylelint] Added but disabled new [`function-no-unknown`](https://github.com/stylelint/stylelint/blob/main/lib/rules/function-no-unknown/README.md) rule, because of false positives
|
|
26
|
+
|
|
27
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.3.1...v2.4.0)
|
|
10
28
|
|
|
11
29
|
## [2.3.1] - 2022.01.28
|
|
12
30
|
|
package/eslint/index.js
CHANGED
|
@@ -424,7 +424,7 @@ module.exports = {
|
|
|
424
424
|
'@typescript-eslint/consistent-type-exports': 'error',
|
|
425
425
|
'@typescript-eslint/consistent-type-imports': ['error', { disallowTypeAnnotations: false }],
|
|
426
426
|
'@typescript-eslint/dot-notation': 'error',
|
|
427
|
-
'@typescript-eslint/explicit-function-return-type': '
|
|
427
|
+
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
428
428
|
'@typescript-eslint/explicit-member-accessibility': ['error', {
|
|
429
429
|
ignoredMethodNames: [
|
|
430
430
|
'constructor',
|
|
@@ -789,7 +789,7 @@ module.exports = {
|
|
|
789
789
|
]
|
|
790
790
|
}],
|
|
791
791
|
'import/no-unresolved': ['error', { caseSensitiveStrict: true }],
|
|
792
|
-
'import/no-unused-modules': 'error',
|
|
792
|
+
'import/no-unused-modules': ['error', { unusedExports: true }],
|
|
793
793
|
'import/no-useless-path-segments': 'error',
|
|
794
794
|
'import/no-webpack-loader-syntax': 'off', // Indeed, you should avoid that, but if we do it, we have a reason for it
|
|
795
795
|
'import/order': ['error', {
|
package/eslint/overrides-jest.js
CHANGED
|
@@ -66,6 +66,7 @@ module.exports = {
|
|
|
66
66
|
'jest/no-alias-methods': 'error',
|
|
67
67
|
'jest/no-commented-out-tests': 'error',
|
|
68
68
|
'jest/no-conditional-expect': 'error',
|
|
69
|
+
'jest/no-conditional-in-test': 'error',
|
|
69
70
|
'jest/no-deprecated-functions': 'error',
|
|
70
71
|
'jest/no-disabled-tests': 'error',
|
|
71
72
|
'jest/no-done-callback': 'error',
|
|
@@ -74,7 +75,6 @@ module.exports = {
|
|
|
74
75
|
'jest/no-focused-tests': 'error',
|
|
75
76
|
'jest/no-hooks': ['error', { allow: ['beforeEach', 'afterEach', 'afterAll'] }],
|
|
76
77
|
'jest/no-identical-title': 'error',
|
|
77
|
-
'jest/no-if': 'error',
|
|
78
78
|
'jest/no-interpolation-in-snapshots': 'error',
|
|
79
79
|
'jest/no-jasmine-globals': 'error',
|
|
80
80
|
'jest/no-jest-import': 'error',
|
|
@@ -90,6 +90,7 @@ module.exports = {
|
|
|
90
90
|
'jest/require-hook': 'error',
|
|
91
91
|
'jest/prefer-comparison-matcher': 'error',
|
|
92
92
|
'jest/prefer-equality-matcher': 'error',
|
|
93
|
+
'jest/prefer-snapshot-hint': 'error',
|
|
93
94
|
'jest/prefer-spy-on': 'error',
|
|
94
95
|
'jest/prefer-strict-equal': 'error',
|
|
95
96
|
'jest/prefer-to-be': 'error',
|
|
@@ -15,6 +15,19 @@ module.exports = {
|
|
|
15
15
|
* @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules
|
|
16
16
|
*/
|
|
17
17
|
'@typescript-eslint/member-ordering': 'off', // For React components we are using react/sort-comp
|
|
18
|
+
'@typescript-eslint/explicit-function-return-type': ['error', {
|
|
19
|
+
allowedNames: [
|
|
20
|
+
'componentDidCatch',
|
|
21
|
+
'componentDidMount',
|
|
22
|
+
'componentDidUpdate',
|
|
23
|
+
'componentWillUnmount',
|
|
24
|
+
'getDerivedStateFromError',
|
|
25
|
+
'getDerivedStateFromProps',
|
|
26
|
+
'getSnapshotBeforeUpdate',
|
|
27
|
+
'render',
|
|
28
|
+
'shouldComponentUpdate'
|
|
29
|
+
]
|
|
30
|
+
}],
|
|
18
31
|
|
|
19
32
|
/**
|
|
20
33
|
* eslint-plugin-react-hooks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linter-bundle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Ready-to use bundle of linting tools, containing configurations for ESLint, stylelint and markdownlint.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -39,25 +39,25 @@
|
|
|
39
39
|
"check-outdated": "npx --yes -- check-outdated --ignore-pre-releases"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
43
|
-
"@typescript-eslint/parser": "5.
|
|
44
|
-
"eslint": "8.
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "5.11.0",
|
|
43
|
+
"@typescript-eslint/parser": "5.11.0",
|
|
44
|
+
"eslint": "8.8.0",
|
|
45
45
|
"eslint-import-resolver-typescript": "2.5.0",
|
|
46
46
|
"eslint-import-resolver-webpack": "0.13.2",
|
|
47
47
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
48
|
-
"eslint-plugin-functional": "4.
|
|
48
|
+
"eslint-plugin-functional": "4.2.0",
|
|
49
49
|
"eslint-plugin-import": "2.25.4",
|
|
50
|
-
"eslint-plugin-jest": "26.
|
|
51
|
-
"eslint-plugin-jsdoc": "37.
|
|
50
|
+
"eslint-plugin-jest": "26.1.0",
|
|
51
|
+
"eslint-plugin-jsdoc": "37.8.1",
|
|
52
52
|
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
53
53
|
"eslint-plugin-node": "11.1.0",
|
|
54
54
|
"eslint-plugin-promise": "6.0.0",
|
|
55
55
|
"eslint-plugin-react": "7.28.0",
|
|
56
56
|
"eslint-plugin-react-hooks": "4.3.0",
|
|
57
57
|
"eslint-plugin-unicorn": "40.1.0",
|
|
58
|
-
"markdownlint-cli": "0.
|
|
58
|
+
"markdownlint-cli": "0.31.1",
|
|
59
59
|
"postcss-scss": "4.0.3",
|
|
60
|
-
"stylelint": "14.
|
|
60
|
+
"stylelint": "14.4.0",
|
|
61
61
|
"stylelint-declaration-block-no-ignored-properties": "2.5.0",
|
|
62
62
|
"stylelint-order": "5.0.0",
|
|
63
63
|
"stylelint-scss": "4.1.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/eslint": "8.4.1",
|
|
73
|
-
"@types/node": "17.0.
|
|
73
|
+
"@types/node": "17.0.16",
|
|
74
74
|
"stylelint-find-new-rules": "^3.0.4",
|
|
75
75
|
"typescript": "4.5.5"
|
|
76
76
|
}
|
package/stylelint/index.js
CHANGED
|
@@ -183,6 +183,7 @@ module.exports = {
|
|
|
183
183
|
'function-linear-gradient-no-nonstandard-direction': true,
|
|
184
184
|
'function-max-empty-lines': 0,
|
|
185
185
|
'function-name-case': 'lower',
|
|
186
|
+
'function-no-unknown': false, // @todo Create issue for false positives for "color.scale"
|
|
186
187
|
'function-parentheses-newline-inside': 'always-multi-line',
|
|
187
188
|
'function-parentheses-space-inside': 'never-single-line',
|
|
188
189
|
'function-url-no-scheme-relative': true,
|