linter-bundle 2.4.0 → 2.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 +36 -1
- package/TODO.md +21 -0
- package/eslint/index.js +5 -2
- package/eslint/overrides-gatsby.js +1 -0
- package/package.json +9 -9
- package/stylelint/index.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,42 @@ 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.8.0...HEAD)
|
|
10
|
+
|
|
11
|
+
## [2.8.0] - 2022.02.18
|
|
12
|
+
|
|
13
|
+
- [eslint] Update `eslint-plugin-jsdoc` from v37.9.1 to v37.9.4
|
|
14
|
+
- [eslint] Update `eslint-plugin-unicorn` from v40.1.0 to v41.0.0
|
|
15
|
+
- [eslint] Make use of [`unicorn/text-encoding-identifier-case`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md) rule
|
|
16
|
+
- [stylelint] Fixed disabling of [`function-no-unknown`](https://github.com/stylelint/stylelint/blob/main/lib/rules/function-no-unknown/README.md) rule, because of false positives
|
|
17
|
+
|
|
18
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.7.0...v2.8.0)
|
|
19
|
+
|
|
20
|
+
## [2.7.0] - 2022.02.16
|
|
21
|
+
|
|
22
|
+
- [eslint] Update `eslint-plugin-jest` from v26.1.0 to v26.1.1
|
|
23
|
+
- [stylelint] Update `stylelint` from v14.5.0 to v14.5.1
|
|
24
|
+
- [eslint] Activate `ignoreUsedVariables` option of [`unicorn/prefer-export-from`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md) rule
|
|
25
|
+
|
|
26
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.6.0...v2.7.0)
|
|
27
|
+
|
|
28
|
+
## [2.6.0] - 2022.02.14
|
|
29
|
+
|
|
30
|
+
- [eslint] Updated `@typescript-eslint/eslint-plugin` from v5.11.0 to v5.12.0
|
|
31
|
+
- [eslint] Updated `@typescript-eslint/parser` from v5.11.0 to v5.12.0
|
|
32
|
+
- [eslint] Updated `eslint` from v8.8.0 to v8.9.0
|
|
33
|
+
- [eslint] Updated `eslint-plugin-jsdoc` from v37.8.2 to v37.9.1
|
|
34
|
+
- [eslint] Ignore `generics` in [`@typescript-eslint/comma-dangle`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/comma-dangle.md) to allow [generic component definitions for function components](https://wanago.io/2020/03/09/functional-react-components-with-generic-props-in-typescript/#crayon-620a96e97d44a141656396)
|
|
35
|
+
|
|
36
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.5.0...v2.6.0)
|
|
37
|
+
|
|
38
|
+
## [2.5.0] - 2022.02.11
|
|
39
|
+
|
|
40
|
+
- [eslint] Updated `eslint-plugin-jsdoc` from v37.8.1 to v37.8.2
|
|
41
|
+
- [stylelint] Updated `stylelint` from v14.4.0 to v14.5.0
|
|
42
|
+
- [eslint/overrides-gatsby] Disabled `unusedExports` and enabled `missingExports` for the [`import/no-unused-modules`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.md) rule, for `src/pages/*.tsx` files.
|
|
43
|
+
|
|
44
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.4.0...v2.5.0)
|
|
10
45
|
|
|
11
46
|
## [2.4.0] - 2022.02.09
|
|
12
47
|
|
package/TODO.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @todo
|
|
2
2
|
|
|
3
|
+
Some tools like Gatsby ship deprecated dependencies of eslint and @typescript-eslint.
|
|
4
|
+
Since npm installs packages alphabetically, the outdated `gatsby` dependencies are installed in the `node_modules` root, instead of the newer `linter-bundle` dependencies. Since the old versions often do not support new rules or new options, this may cause linting to fail with errors like this:
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
Error while loading rule 'import/no-unused-modules': .eslintrc.js » ./node_modules/linter-bundle/eslint/index.js:
|
|
8
|
+
Configuration for rule "@typescript-eslint/no-throw-literal" is invalid:
|
|
9
|
+
Value [{"allowThrowingAny":false,"allowThrowingUnknown":true}] should NOT have more than 0 items.
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
To solve such problems, npm supports [`overrides`](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides) as of version [8.3](https://github.com/npm/cli/releases/tag/v8.3.0), while yarn supports [`resolutions`](https://classic.yarnpkg.com/en/docs/selective-version-resolutions/).
|
|
13
|
+
|
|
14
|
+
By using the `enforce-deps` option, linter-bundle will ensure the right versions of the dependencies are installed, and if not it automatically write these options to your package.json and then run an `npm i` or `yarn`, before starting the linting to ensure that the correct dependency versions are installed.
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
"overrides": {
|
|
18
|
+
"@typescript-eslint/eslint-plugin": "$linter-bundle",
|
|
19
|
+
"@typescript-eslint/parser": "$linter-bundle",
|
|
20
|
+
"eslint": "$linter-bundle"
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
3
24
|
- Option to lint only changed files in Git
|
|
4
25
|
[lint-staged](https://github.com/okonet/lint-staged)
|
|
5
26
|
[affected](https://www.npmjs.com/package/affected)
|
package/eslint/index.js
CHANGED
|
@@ -416,7 +416,9 @@ module.exports = {
|
|
|
416
416
|
}],
|
|
417
417
|
'@typescript-eslint/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
|
|
418
418
|
'@typescript-eslint/class-literal-property-style': 'error',
|
|
419
|
-
'@typescript-eslint/comma-dangle': ['error',
|
|
419
|
+
'@typescript-eslint/comma-dangle': ['error', {
|
|
420
|
+
generics: 'ignore'
|
|
421
|
+
}],
|
|
420
422
|
'@typescript-eslint/comma-spacing': 'error',
|
|
421
423
|
'@typescript-eslint/consistent-indexed-object-style': 'error',
|
|
422
424
|
'@typescript-eslint/consistent-type-assertions': 'error',
|
|
@@ -964,7 +966,7 @@ module.exports = {
|
|
|
964
966
|
'unicorn/prefer-dom-node-dataset': 'off', // `setAttribute` is faster than `dataset`. See https://www.measurethat.net/Benchmarks/Show/7740/0/classname-vs-setattribute-vs-classlist-vs-dataset
|
|
965
967
|
'unicorn/prefer-dom-node-remove': 'error',
|
|
966
968
|
'unicorn/prefer-dom-node-text-content': 'error',
|
|
967
|
-
'unicorn/prefer-export-from': 'error',
|
|
969
|
+
'unicorn/prefer-export-from': ['error', { ignoreUsedVariables: true }],
|
|
968
970
|
'unicorn/prefer-includes': 'error',
|
|
969
971
|
'unicorn/prefer-json-parse-buffer': 'error',
|
|
970
972
|
'unicorn/prefer-keyboard-event-key': 'error',
|
|
@@ -1003,6 +1005,7 @@ module.exports = {
|
|
|
1003
1005
|
}
|
|
1004
1006
|
}],
|
|
1005
1007
|
'unicorn/template-indent': 'error',
|
|
1008
|
+
'unicorn/text-encoding-identifier-case': 'error',
|
|
1006
1009
|
'unicorn/throw-new-error': 'error'
|
|
1007
1010
|
}
|
|
1008
1011
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linter-bundle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.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.12.0",
|
|
43
|
+
"@typescript-eslint/parser": "5.12.0",
|
|
44
|
+
"eslint": "8.9.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
48
|
"eslint-plugin-functional": "4.2.0",
|
|
49
49
|
"eslint-plugin-import": "2.25.4",
|
|
50
|
-
"eslint-plugin-jest": "26.1.
|
|
51
|
-
"eslint-plugin-jsdoc": "37.
|
|
50
|
+
"eslint-plugin-jest": "26.1.1",
|
|
51
|
+
"eslint-plugin-jsdoc": "37.9.4",
|
|
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
|
-
"eslint-plugin-unicorn": "
|
|
57
|
+
"eslint-plugin-unicorn": "41.0.0",
|
|
58
58
|
"markdownlint-cli": "0.31.1",
|
|
59
59
|
"postcss-scss": "4.0.3",
|
|
60
|
-
"stylelint": "14.
|
|
60
|
+
"stylelint": "14.5.1",
|
|
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.18",
|
|
74
74
|
"stylelint-find-new-rules": "^3.0.4",
|
|
75
75
|
"typescript": "4.5.5"
|
|
76
76
|
}
|
package/stylelint/index.js
CHANGED
|
@@ -183,7 +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':
|
|
186
|
+
'function-no-unknown': null, // @todo Create issue for false positives for "color.scale". Need this be covered by the `ignoreFunctions` option?
|
|
187
187
|
'function-parentheses-newline-inside': 'always-multi-line',
|
|
188
188
|
'function-parentheses-space-inside': 'never-single-line',
|
|
189
189
|
'function-url-no-scheme-relative': true,
|