linter-bundle 2.3.0 → 2.3.1
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 +16 -3
- package/eslint/index.js +3 -3
- package/eslint/overrides-gatsby.js +7 -0
- package/eslint/overrides-javascript.js +1 -0
- package/eslint/overrides-react.js +1 -1
- package/lint.js +0 -1
- package/package.json +2 -2
- package/stylelint/index.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,9 +6,22 @@ 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.3.1...HEAD)
|
|
10
10
|
|
|
11
|
-
## [2.
|
|
11
|
+
## [2.3.1] - 2022.01.28
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- [eslint/overrides-javascript(-lazy)] Move `import/no-import-module-exports` rule to`overrides-javascript`
|
|
16
|
+
- [eslint/overrides-gatsby] Ignore '@reach/router' in `import/no-unresolved` rule
|
|
17
|
+
- [eslint] Disabled `react/require-default-props`, because of false-positive for React.forwardRef wrapped functional components
|
|
18
|
+
- [eslint] Disabled `unicorn/prefer-top-level-await`, because of false-positive on environments with Node.js below v14.8
|
|
19
|
+
- [eslint] Activated `allowThrowingUnknown` option of the [`@typescript-eslint/no-throw-literal`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md) rule
|
|
20
|
+
- [stylelint] Activate `camelCaseSvgKeywords` option of the [`value-keyword-case`](https://github.com/stylelint/stylelint/tree/main/lib/rules/value-keyword-case) rule
|
|
21
|
+
|
|
22
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.3.0...v2.3.1)
|
|
23
|
+
|
|
24
|
+
## [2.3.0] - 2022.01.27
|
|
12
25
|
|
|
13
26
|
### Changed
|
|
14
27
|
|
|
@@ -47,7 +60,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
47
60
|
- [stylelint] Added new [`scss/at-use-no-unnamespaced`](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-use-no-unnamespaced) rule
|
|
48
61
|
- [stylelint] Added but disabled [`rule-selector-property-disallowed-list`](https://github.com/stylelint/stylelint/tree/main/lib/rules/rule-selector-property-disallowed-list) rule
|
|
49
62
|
|
|
50
|
-
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.1.0...v2.
|
|
63
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.1.0...v2.3.0)
|
|
51
64
|
|
|
52
65
|
## [2.1.0] - 2021.11.07
|
|
53
66
|
|
package/eslint/index.js
CHANGED
|
@@ -644,7 +644,7 @@ module.exports = {
|
|
|
644
644
|
'@typescript-eslint/no-this-alias': 'error',
|
|
645
645
|
'@typescript-eslint/no-throw-literal': ['error', {
|
|
646
646
|
allowThrowingAny: false,
|
|
647
|
-
allowThrowingUnknown:
|
|
647
|
+
allowThrowingUnknown: true
|
|
648
648
|
}],
|
|
649
649
|
'@typescript-eslint/no-type-alias': ['off', { // @todo There should be an option like 'sub-in-unions-and-intersections', which allows `type A = (string | number)[];`
|
|
650
650
|
allowAliases: 'always',
|
|
@@ -770,7 +770,7 @@ module.exports = {
|
|
|
770
770
|
'workbox-window/utils/WorkboxEvent'
|
|
771
771
|
]
|
|
772
772
|
}],
|
|
773
|
-
'import/no-import-module-exports': '
|
|
773
|
+
'import/no-import-module-exports': 'off', // Activated only for JavaScript files
|
|
774
774
|
'import/no-mutable-exports': 'error',
|
|
775
775
|
'import/no-named-as-default-member': 'error',
|
|
776
776
|
'import/no-named-as-default': 'error',
|
|
@@ -987,7 +987,7 @@ module.exports = {
|
|
|
987
987
|
'unicorn/prefer-string-trim-start-end': 'error',
|
|
988
988
|
'unicorn/prefer-switch': 'error',
|
|
989
989
|
'unicorn/prefer-ternary': 'off', // We prefer readability over saving a few chars
|
|
990
|
-
'unicorn/prefer-top-level-await': '
|
|
990
|
+
'unicorn/prefer-top-level-await': 'off', // @todo There should be a detection that this option is only activated on Node.js v14.8 environments and above (Check for "engine" property in package.json, and "node -v")
|
|
991
991
|
'unicorn/prefer-regexp-test': 'error',
|
|
992
992
|
'unicorn/prefer-type-error': 'error',
|
|
993
993
|
'unicorn/prevent-abbreviations': ['error', { ignore: ['args', 'i', 'j', 'i18n', 'ref', 'Ref', 'params', 'props', 'Props'] }],
|
|
@@ -33,6 +33,13 @@ module.exports = {
|
|
|
33
33
|
*/
|
|
34
34
|
'@typescript-eslint/no-confusing-void-expression': 'off', // @todo Conflicts with graphql-template strings
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* eslint-plugin-import
|
|
38
|
+
*
|
|
39
|
+
* @see https://github.com/import-js/eslint-plugin-import
|
|
40
|
+
*/
|
|
41
|
+
'import/no-unresolved': ['error', { caseSensitiveStrict: true, ignore: ['@reach/router'] }],
|
|
42
|
+
|
|
36
43
|
/**
|
|
37
44
|
* eslint-plugin-unicorn
|
|
38
45
|
*
|
|
@@ -88,7 +88,7 @@ module.exports = {
|
|
|
88
88
|
'react/prefer-stateless-function': 'error',
|
|
89
89
|
'react/prop-types': 'off',
|
|
90
90
|
'react/react-in-jsx-scope': 'error',
|
|
91
|
-
'react/require-default-props': ['
|
|
91
|
+
'react/require-default-props': ['off', { forbidDefaultForRequired: true, ignoreFunctionalComponents: true }], // @see https://medium.com/@matanbobi/react-defaultprops-is-dying-whos-the-contender-443c19d9e7f1 @todo Also disabled becaues of false-positive with React.forwardRef(), create bug report?
|
|
92
92
|
'react/require-optimization': 'error',
|
|
93
93
|
'react/require-render-return': 'error',
|
|
94
94
|
'react/self-closing-comp': 'error',
|
package/lint.js
CHANGED
|
@@ -121,7 +121,6 @@ const jobs = getTasksToRun(process.argv.splice(2)).map(({ taskName, config }) =>
|
|
|
121
121
|
throw new Error(`"${taskName}" is not a valid task.`);
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
// eslint-disable-next-line unicorn/prefer-top-level-await -- The minimum required Node.js version is v14.8, but we are also support down till v14.0
|
|
125
124
|
void (async () => {
|
|
126
125
|
for (const { jobTitle, taskSetup, job } of jobs) {
|
|
127
126
|
process.stdout.write(jobTitle);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linter-bundle",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Ready-to use bundle of linting tools, containing configurations for ESLint, stylelint and markdownlint.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -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.13",
|
|
74
74
|
"stylelint-find-new-rules": "^3.0.4",
|
|
75
75
|
"typescript": "4.5.5"
|
|
76
76
|
}
|
package/stylelint/index.js
CHANGED
|
@@ -309,7 +309,12 @@ module.exports = {
|
|
|
309
309
|
'unit-case': 'lower',
|
|
310
310
|
'unit-disallowed-list': null,
|
|
311
311
|
'unit-no-unknown': true,
|
|
312
|
-
'value-keyword-case':
|
|
312
|
+
'value-keyword-case': [
|
|
313
|
+
'lower',
|
|
314
|
+
{
|
|
315
|
+
camelCaseSvgKeywords: true
|
|
316
|
+
}
|
|
317
|
+
],
|
|
313
318
|
'value-list-comma-newline-after': 'always-multi-line',
|
|
314
319
|
'value-list-comma-newline-before': 'never-multi-line',
|
|
315
320
|
'value-list-comma-space-after': 'always-single-line',
|