linter-bundle 2.4.0 → 2.5.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 CHANGED
@@ -6,7 +6,15 @@ 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.4.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.5.0...HEAD)
10
+
11
+ ## [2.5.0] - 2022.02.11
12
+
13
+ - [eslint] Updated `eslint-plugin-jsdoc` from v37.8.1 to v37.8.2
14
+ - [stylelint] Updated `stylelint` from v14.4.0 to v14.5.0
15
+ - [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.
16
+
17
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.4.0...v2.5.0)
10
18
 
11
19
  ## [2.4.0] - 2022.02.09
12
20
 
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)
@@ -87,6 +87,7 @@ module.exports = {
87
87
  * @see https://github.com/import-js/eslint-plugin-import
88
88
  */
89
89
  'import/no-default-export': 'off',
90
+ 'import/no-unused-modules': ['error', { missingExports: true }],
90
91
 
91
92
  /**
92
93
  * eslint-plugin-unicorn
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linter-bundle",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Ready-to use bundle of linting tools, containing configurations for ESLint, stylelint and markdownlint.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -48,7 +48,7 @@
48
48
  "eslint-plugin-functional": "4.2.0",
49
49
  "eslint-plugin-import": "2.25.4",
50
50
  "eslint-plugin-jest": "26.1.0",
51
- "eslint-plugin-jsdoc": "37.8.1",
51
+ "eslint-plugin-jsdoc": "37.8.2",
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",
@@ -57,7 +57,7 @@
57
57
  "eslint-plugin-unicorn": "40.1.0",
58
58
  "markdownlint-cli": "0.31.1",
59
59
  "postcss-scss": "4.0.3",
60
- "stylelint": "14.4.0",
60
+ "stylelint": "14.5.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.16",
73
+ "@types/node": "17.0.17",
74
74
  "stylelint-find-new-rules": "^3.0.4",
75
75
  "typescript": "4.5.5"
76
76
  }
@@ -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': false, // @todo Create issue for false positives for "color.scale"
186
+ 'function-no-unknown': false, // @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,