linter-bundle 3.4.0 → 3.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,28 @@ 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/v3.4.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v3.5.0...HEAD)
10
+
11
+ ## [3.5.0] - 2023-07-28
12
+
13
+ ### Changed
14
+
15
+ - [eslint] Updated `@typescript-eslint/eslint-plugin` from `6.1.0` to `6.2.0`
16
+ - [eslint] Updated `eslint-plugin-import` from `2.27.5` to `2.28.0`
17
+ - [eslint] Updated `eslint-plugin-jsdoc` from `46.4.4` to `46.4.5`
18
+ - [eslint] Updated `eslint-plugin-react` from `7.32.2` to `7.33.0`
19
+ - [eslint] Updated `eslint-plugin-unicorn` from `48.0.0` to `48.0.1`
20
+ - [eslint] Reactivated `unicorn/no-empty-file`
21
+ - [eslint] Activated `ignoreConditionalTests` and `ignoreMixedLogicalExpressions` options of [@typescript-eslint/prefer-nullish-coalescing](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md) rule
22
+ - [styleint] Set `ignoreFunctions` option to `/^custom-/u` of [`scss/function-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-no-unknown/README.md) rule
23
+ - [stylelint] Ignore SCSS variables in [`declaration-property-value-no-unknown`](https://stylelint.io/user-guide/rules/declaration-property-value-no-unknown/) rule
24
+ - [stylelint] Ignore wrapping parentheses for `grid-template-areas` values in [`declaration-property-value-no-unknown`](https://stylelint.io/user-guide/rules/declaration-property-value-no-unknown/) rule
25
+
26
+ ### Added
27
+
28
+ - Replace the ESLint rule `class-methods-use-this` by the new [`@typescript-eslint/class-methods-use-this`](https://typescript-eslint.io/rules/class-methods-use-this/) rule
29
+
30
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v3.4.0...v3.5.0)
10
31
 
11
32
  ## [3.4.0] - 2023-07-20
12
33
 
package/eslint/index.js CHANGED
@@ -125,7 +125,7 @@ module.exports = {
125
125
  'brace-style': 'off', // Covered by @typescript-eslint/brace-style
126
126
  'camelcase': 'off', // Covered by @typescript-eslint/naming-convention
127
127
  'capitalized-comments': 'off',
128
- 'class-methods-use-this': ['error', { exceptMethods: ['componentDidMount', 'componentDidUpdate', 'componentWillUnmount', 'shouldComponentUpdate'] }],
128
+ 'class-methods-use-this': 'off', // Covered by @typescript-eslint/class-methods-use-this
129
129
  'comma-dangle': 'off', // Covered by @typescript-eslint/comma-dangle
130
130
  'comma-spacing': 'off', // Covered by @typescript-eslint/comma-spacing
131
131
  'comma-style': 'error',
@@ -423,9 +423,8 @@ module.exports = {
423
423
  }],
424
424
  '@typescript-eslint/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
425
425
  '@typescript-eslint/class-literal-property-style': 'error',
426
- '@typescript-eslint/comma-dangle': ['error', {
427
- generics: 'ignore'
428
- }],
426
+ '@typescript-eslint/class-methods-use-this': ['error', { exceptMethods: ['componentDidMount', 'componentDidUpdate', 'componentWillUnmount', 'shouldComponentUpdate'] }],
427
+ '@typescript-eslint/comma-dangle': ['error', { generics: 'ignore' }],
429
428
  '@typescript-eslint/comma-spacing': 'error',
430
429
  '@typescript-eslint/consistent-generic-constructors': 'error',
431
430
  '@typescript-eslint/consistent-indexed-object-style': 'error',
@@ -745,7 +744,7 @@ module.exports = {
745
744
  '@typescript-eslint/prefer-includes': 'error',
746
745
  '@typescript-eslint/prefer-literal-enum-member': 'error',
747
746
  '@typescript-eslint/prefer-namespace-keyword': 'error',
748
- '@typescript-eslint/prefer-nullish-coalescing': 'error',
747
+ '@typescript-eslint/prefer-nullish-coalescing': ['error', { ignoreConditionalTests: true, ignoreMixedLogicalExpressions: true }],
749
748
  '@typescript-eslint/prefer-optional-chain': 'error',
750
749
  '@typescript-eslint/prefer-readonly': 'error',
751
750
  '@typescript-eslint/prefer-readonly-parameter-types': ['off', { ignoreInferredTypes: true }], // @todo An interface should ensure that it's properties are readonly, not every usage of it
@@ -961,7 +960,7 @@ module.exports = {
961
960
  'unicorn/no-await-expression-member': 'error',
962
961
  'unicorn/no-console-spaces': 'error',
963
962
  'unicorn/no-document-cookie': 'error',
964
- 'unicorn/no-empty-file': 'off', // @todo False-positives since @typescript-eslint v6.0.0. @see https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2175
963
+ 'unicorn/no-empty-file': 'error',
965
964
  'unicorn/no-for-loop': 'off', // @typescript-eslint/prefer-for-of
966
965
  'unicorn/no-hex-escape': 'error',
967
966
  'unicorn/no-instanceof-array': 'error',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linter-bundle",
3
- "version": "3.4.0",
3
+ "version": "3.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",
@@ -40,23 +40,23 @@
40
40
  "check-outdated": "npx --yes -- check-outdated --ignore-pre-releases"
41
41
  },
42
42
  "dependencies": {
43
- "@typescript-eslint/eslint-plugin": "6.1.0",
44
- "@typescript-eslint/parser": "6.1.0",
45
- "@typescript-eslint/utils": "6.1.0",
43
+ "@typescript-eslint/eslint-plugin": "6.2.0",
44
+ "@typescript-eslint/parser": "6.2.0",
45
+ "@typescript-eslint/utils": "6.2.0",
46
46
  "eslint": "8.45.0",
47
47
  "eslint-import-resolver-typescript": "3.5.5",
48
48
  "eslint-import-resolver-webpack": "0.13.2",
49
49
  "eslint-plugin-eslint-comments": "3.2.0",
50
50
  "eslint-plugin-functional": "5.0.8",
51
- "eslint-plugin-import": "2.27.5",
51
+ "eslint-plugin-import": "2.28.0",
52
52
  "eslint-plugin-jest": "27.2.3",
53
- "eslint-plugin-jsdoc": "46.4.4",
53
+ "eslint-plugin-jsdoc": "46.4.5",
54
54
  "eslint-plugin-jsx-a11y": "6.7.1",
55
55
  "eslint-plugin-n": "16.0.1",
56
56
  "eslint-plugin-promise": "6.1.1",
57
- "eslint-plugin-react": "7.32.2",
57
+ "eslint-plugin-react": "7.33.0",
58
58
  "eslint-plugin-react-hooks": "4.6.0",
59
- "eslint-plugin-unicorn": "48.0.0",
59
+ "eslint-plugin-unicorn": "48.0.1",
60
60
  "markdownlint-cli": "0.35.0",
61
61
  "micromatch": "4.0.5",
62
62
  "postcss-scss": "4.0.6",
@@ -71,9 +71,9 @@
71
71
  "typescript": "^4.0.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@types/eslint": "8.44.0",
74
+ "@types/eslint": "8.44.1",
75
75
  "@types/micromatch": "4.0.2",
76
- "@types/node": "20.4.2",
76
+ "@types/node": "20.4.5",
77
77
  "stylelint-find-new-rules": "4.1.0",
78
78
  "typescript": "5.1.6"
79
79
  }
@@ -155,7 +155,9 @@ module.exports = {
155
155
  true,
156
156
  {
157
157
  ignoreProperties: {
158
- 'initial-value': '/.+/'
158
+ 'initial-value': /.+/u,
159
+ 'grid-template-areas': /^\([^\u0000]+\)$/u, // Whole block wrapped in parentheses.
160
+ '/.+/': /((^|\s)\$[a-z])|/ui // SCSS variables
159
161
  }
160
162
  }
161
163
  ],
@@ -901,7 +903,8 @@ module.exports = {
901
903
  'scss/dollar-variable-empty-line-after': [
902
904
  'always',
903
905
  {
904
- except: ['last-nested', 'before-dollar-variable']
906
+ except: ['last-nested', 'before-dollar-variable'],
907
+ ignore: ['before-comment', 'inside-single-line-block']
905
908
  }
906
909
  ],
907
910
  'scss/dollar-variable-first-in-block': [true, { ignore: ['comments', 'imports'] }],
@@ -918,7 +921,7 @@ module.exports = {
918
921
  'scss/double-slash-comment-inline': null,
919
922
  'scss/double-slash-comment-whitespace-inside': 'always',
920
923
  'scss/function-color-relative': true,
921
- 'scss/function-no-unknown': true,
924
+ 'scss/function-no-unknown': [true, { ignoreFunctions: [/^custom-/u] }],
922
925
  'scss/function-quote-no-quoted-strings-inside': true,
923
926
  'scss/function-unquote-no-unquoted-strings-inside': true,
924
927
  'scss/map-keys-quotes': 'always',