@darksheep/eslint 6.4.2 → 6.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/package.json +12 -13
  3. package/src/configs/eslint-base.js +3 -3
  4. package/src/configs/eslint-complexity.js +2 -2
  5. package/src/configs/eslint-ignores.js +5 -5
  6. package/src/configs/eslint-recommended.js +2 -2
  7. package/src/configs/eslint-style.js +3 -3
  8. package/src/custom-logger/index.js +20 -11
  9. package/src/custom-rules/instance-of-array.js +4 -4
  10. package/src/custom-rules/loose-types.js +52 -52
  11. package/src/custom-rules/no-useless-expression.js +1 -1
  12. package/src/custom-rules/sequence-expression.js +1 -1
  13. package/src/index.js +14 -10
  14. package/src/plugins/eslint-comments.js +4 -4
  15. package/src/plugins/jsdoc.js +40 -12
  16. package/src/plugins/json.js +10 -2
  17. package/src/plugins/node.js +18 -24
  18. package/src/plugins/package-json.js +5 -9
  19. package/src/plugins/perfectionist.js +12 -3
  20. package/src/plugins/promise.js +6 -2
  21. package/src/plugins/react.js +3 -3
  22. package/src/plugins/regexp.js +96 -3
  23. package/src/plugins/sca.js +3 -3
  24. package/src/plugins/security.js +2 -2
  25. package/src/plugins/style.js +61 -208
  26. package/src/plugins/typescript.js +4 -4
  27. package/src/plugins/unicorn.js +142 -51
  28. package/src/plugins/unused-imports.js +3 -3
  29. package/src/plugins/yml.js +8 -2
  30. package/src/utilities/editorconfig.js +18 -18
  31. package/src/utilities/eslint-files.js +10 -10
  32. package/src/utilities/expand-glob.js +8 -8
  33. package/src/utilities/filesystem.js +16 -16
  34. package/src/utilities/package.js +5 -5
  35. package/types/eslint.config.d.ts +5 -1
  36. package/types/src/configs/eslint-base.d.ts +3 -3
  37. package/types/src/configs/eslint-complexity.d.ts +3 -3
  38. package/types/src/configs/eslint-ignores.d.ts +4 -4
  39. package/types/src/configs/eslint-recommended.d.ts +3 -3
  40. package/types/src/configs/eslint-style.d.ts +4 -4
  41. package/types/src/index.d.ts +3 -3
  42. package/types/src/plugins/eslint-comments.d.ts +3 -3
  43. package/types/src/plugins/jsdoc.d.ts +4 -4
  44. package/types/src/plugins/json.d.ts +3 -3
  45. package/types/src/plugins/node.d.ts +4 -4
  46. package/types/src/plugins/package-json.d.ts +3 -3
  47. package/types/src/plugins/perfectionist.d.ts +4 -4
  48. package/types/src/plugins/promise.d.ts +3 -3
  49. package/types/src/plugins/react.d.ts +4 -4
  50. package/types/src/plugins/regexp.d.ts +3 -3
  51. package/types/src/plugins/sca.d.ts +4 -4
  52. package/types/src/plugins/security.d.ts +3 -3
  53. package/types/src/plugins/style.d.ts +3 -3
  54. package/types/src/plugins/typescript.d.ts +4 -4
  55. package/types/src/plugins/unicorn.d.ts +4 -3
  56. package/types/src/plugins/unused-imports.d.ts +4 -4
  57. package/types/src/plugins/yml.d.ts +3 -3
  58. package/types/src/utilities/editorconfig.d.ts +10 -10
  59. package/types/src/utilities/eslint-files.d.ts +7 -7
  60. package/types/src/utilities/expand-glob.d.ts +1 -1
  61. package/types/src/utilities/filesystem.d.ts +16 -16
  62. package/types/src/utilities/package.d.ts +3 -3
@@ -4,9 +4,9 @@ import { getTypescriptFiles } from '../utilities/eslint-files.js';
4
4
  import { getPackageJson } from '../utilities/package.js';
5
5
 
6
6
  /**
7
- * Get ESLint config for js docs
8
- * @param {URL} root The root of the package being linted
9
- * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
7
+ * Get ESLint config for JSDoc.
8
+ * @param {URL} root - The root of the package being linted.
9
+ * @returns {Promise<import('eslint').Linter.Config[]>}
10
10
  */
11
11
  export async function createEslintJSDocConfig(root) {
12
12
  const tsPackage = await getPackageJson(root, 'typescript');
@@ -19,37 +19,65 @@ export async function createEslintJSDocConfig(root) {
19
19
  settings: {
20
20
  jsdoc: {
21
21
  mode: 'typescript',
22
- // Prefer 'Object' over 'object'
23
- preferredTypes: { object: 'Object' },
22
+ preferredTypes: { object: [ 'Object' ] },
24
23
  },
25
24
  },
26
25
  rules: {
27
26
  'jsdoc/check-access': 'warn',
28
27
  'jsdoc/check-alignment': 'warn',
28
+ 'jsdoc/check-examples': 'off',
29
+ 'jsdoc/check-indentation': 'off',
30
+ 'jsdoc/check-line-alignment': [ 'error', 'never', { customSpacings: { postDelimiter: 1, postTag: 1, postType: 1, postName: 1 } } ],
29
31
  'jsdoc/check-param-names': 'warn',
30
32
  'jsdoc/check-property-names': 'warn',
33
+ 'jsdoc/check-syntax': 'error',
31
34
  'jsdoc/check-tag-names': 'warn',
35
+ 'jsdoc/check-template-names': 'off',
36
+ 'jsdoc/check-types': typeChecks,
32
37
  'jsdoc/check-values': 'warn',
38
+ 'jsdoc/convert-to-jsdoc-comments': 'off',
33
39
  'jsdoc/empty-tags': 'warn',
34
40
  'jsdoc/implements-on-classes': 'error',
41
+ 'jsdoc/imports-as-dependencies': 'off',
35
42
  'jsdoc/informative-docs': 'warn',
43
+ 'jsdoc/lines-before-block': 'off',
44
+ 'jsdoc/match-description': 'off',
45
+ 'jsdoc/match-name': 'off',
46
+ 'jsdoc/multiline-blocks': 'off',
47
+ 'jsdoc/no-bad-blocks': 'warn',
48
+ 'jsdoc/no-blank-block-descriptions': 'error',
49
+ 'jsdoc/no-blank-blocks': 'error',
36
50
  'jsdoc/no-defaults': 'warn',
51
+ 'jsdoc/no-missing-syntax': 'off',
37
52
  'jsdoc/no-multi-asterisks': 'warn',
38
- 'jsdoc/require-jsdoc': [ 1, { publicOnly: true } ],
39
- 'jsdoc/require-param': 'warn',
53
+ 'jsdoc/no-restricted-syntax': 'off',
54
+ 'jsdoc/no-undefined-types': typeChecks,
55
+ 'jsdoc/require-asterisk-prefix': 'error',
56
+ 'jsdoc/require-description-complete-sentence': 'error',
57
+ 'jsdoc/require-description': 'off',
58
+ 'jsdoc/require-example': 'off',
59
+ 'jsdoc/require-file-overview': 'off', // Could automatically add a licence?
60
+ 'jsdoc/require-hyphen-before-param-description': [ 'error', 'always' ],
61
+ 'jsdoc/require-jsdoc': [ 'warn', { publicOnly: true } ],
40
62
  'jsdoc/require-param-description': 'warn',
41
63
  'jsdoc/require-param-name': 'warn',
42
64
  'jsdoc/require-param-type': 'warn',
43
- 'jsdoc/require-property': 'warn',
65
+ 'jsdoc/require-param': 'warn',
44
66
  'jsdoc/require-property-description': 'warn',
45
67
  'jsdoc/require-property-name': 'warn',
46
68
  'jsdoc/require-property-type': 'warn',
47
- 'jsdoc/require-returns': 'warn',
69
+ 'jsdoc/require-property': 'warn',
48
70
  'jsdoc/require-returns-check': 'warn',
71
+ 'jsdoc/require-returns-description': 'off',
49
72
  'jsdoc/require-returns-type': 'warn',
50
-
51
- 'jsdoc/check-types': typeChecks,
52
- 'jsdoc/no-undefined-types': typeChecks,
73
+ 'jsdoc/require-returns': 'warn',
74
+ 'jsdoc/require-template': 'off',
75
+ 'jsdoc/require-throws': 'off',
76
+ 'jsdoc/require-yields-check': 'off',
77
+ 'jsdoc/require-yields': 'off',
78
+ 'jsdoc/sort-tags': 'error',
79
+ 'jsdoc/tag-lines': 'off',
80
+ 'jsdoc/text-escaping': 'off',
53
81
  'jsdoc/valid-types': typeChecks,
54
82
  },
55
83
  },
@@ -2,8 +2,8 @@ import jsonc from 'eslint-plugin-jsonc';
2
2
  import parser from 'jsonc-eslint-parser';
3
3
 
4
4
  /**
5
- * Get ESLint config for imports check
6
- * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
5
+ * Get ESLint config for imports check.
6
+ * @returns {Promise<import('eslint').Linter.Config[]>}
7
7
  */
8
8
  export async function createEslintJsonConfig() {
9
9
  return [
@@ -14,10 +14,18 @@ export async function createEslintJsonConfig() {
14
14
  // @ts-expect-error jsonc does not match the plugin interface
15
15
  plugins: { jsonc },
16
16
  rules: {
17
+ 'jsonc/auto': 'off',
18
+ 'jsonc/key-name-casing': 'off',
19
+ 'jsonc/sort-array-values': 'off',
20
+ 'jsonc/sort-keys': 'off',
21
+
17
22
  'jsonc/array-bracket-newline': [ 'error', 'consistent' ],
18
23
  'jsonc/array-bracket-spacing': [ 'error', 'always' ],
19
24
  'jsonc/array-element-newline': [ 'error', 'consistent' ],
25
+ 'jsonc/comma-style': [ 'error', 'last' ],
20
26
  'jsonc/key-spacing': [ 'error' ],
27
+ 'jsonc/no-irregular-whitespace': 'error',
28
+ 'jsonc/no-octal-escape': 'error',
21
29
  'jsonc/object-curly-newline': [ 'error', { consistent: true } ],
22
30
  'jsonc/object-curly-spacing': [ 'error', 'always' ],
23
31
  'jsonc/object-property-newline': [ 'error', { allowAllPropertiesOnSameLine: true } ],
@@ -16,36 +16,28 @@ const module = n.configs['flat/recommended-module'];
16
16
 
17
17
  /** @type {import('eslint').Linter.RulesRecord} */
18
18
  const commonRules = {
19
- 'n/no-new-require': 'error',
20
- 'n/no-mixed-requires': 'error',
21
-
22
19
  'n/callback-return': 'error',
20
+ 'n/exports-style': [ 'error', 'module.exports' ],
21
+ 'n/file-extension-in-import': [ 'error', 'always' ],
22
+ 'n/global-require': [ 'error' ],
23
23
  'n/handle-callback-err': 'error',
24
- 'n/no-process-exit': 'warn',
25
- 'n/no-process-env': 'warn',
26
- 'n/no-path-concat': 'error',
27
- 'n/prefer-node-protocol': 'warn',
28
-
24
+ 'n/hashbang': 'error',
29
25
  'n/no-callback-literal': 'off',
26
+ 'n/no-deprecated-api': 'error',
30
27
  'n/no-exports-assign': 'off',
31
-
32
- 'n/global-require': [ 'error' ],
28
+ 'n/no-mixed-requires': 'error',
29
+ 'n/no-new-require': 'error',
30
+ 'n/no-path-concat': 'error',
31
+ 'n/no-process-env': 'warn',
32
+ 'n/no-process-exit': 'warn',
33
+ 'n/no-restricted-import': 'off',
34
+ 'n/no-restricted-require': 'off',
33
35
  'n/no-unpublished-bin': 'error',
34
36
  'n/no-unpublished-import': [ 'error', { ignoreTypeImport: true } ],
35
37
  'n/no-unpublished-require': 'error',
36
-
37
38
  'n/no-unsupported-features/es-builtins': 'error',
38
39
  'n/no-unsupported-features/es-syntax': [ 'error', { ignores: [ 'modules' ] } ],
39
40
  'n/no-unsupported-features/node-builtins': 'error',
40
-
41
- 'n/process-exit-as-throw': 'error',
42
- 'n/hashbang': 'error',
43
-
44
- 'n/no-deprecated-api': 'error',
45
-
46
- 'n/exports-style': [ 'error', 'module.exports' ],
47
- 'n/file-extension-in-import': [ 'error', 'always' ],
48
-
49
41
  'n/prefer-global/buffer': [ 'warn', 'always' ],
50
42
  'n/prefer-global/console': [ 'warn', 'always' ],
51
43
  'n/prefer-global/process': [ 'warn', 'always' ],
@@ -53,12 +45,14 @@ const commonRules = {
53
45
  'n/prefer-global/text-encoder': [ 'warn', 'never' ],
54
46
  'n/prefer-global/url-search-params': [ 'warn', 'never' ],
55
47
  'n/prefer-global/url': [ 'warn', 'never' ],
48
+ 'n/prefer-node-protocol': 'warn',
56
49
  'n/prefer-promises/dns': 'warn',
57
50
  'n/prefer-promises/fs': 'warn',
51
+ 'n/process-exit-as-throw': 'error',
58
52
  };
59
53
 
60
54
  /**
61
- * @param {string[]} globs A list of file globs whos extensions to get
55
+ * @param {string[]} globs - A list of file globs whos extensions to get.
62
56
  * @returns {string[]}
63
57
  */
64
58
  function toExt(globs) {
@@ -66,9 +60,9 @@ function toExt(globs) {
66
60
  }
67
61
 
68
62
  /**
69
- * Get ESLint config for the node plugin
70
- * @param {URL} root root url
71
- * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
63
+ * Get ESLint config for the node plugin.
64
+ * @param {URL} root - Root url.
65
+ * @returns {Promise<import('eslint').Linter.Config[]>}
72
66
  */
73
67
  export async function createEslintNodeConfig(root) {
74
68
  const commonFiles = await getCommonFiles(root);
@@ -2,8 +2,8 @@ import * as plugin from 'eslint-plugin-package-json';
2
2
  import jsoncParser from 'jsonc-eslint-parser';
3
3
 
4
4
  /**
5
- * Get ESLint config for the regexp plugin
6
- * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
5
+ * Get ESLint config for the regexp plugin.
6
+ * @returns {Promise<import('eslint').Linter.Config[]>}
7
7
  */
8
8
  export async function createEslintPackageJsonConfig() {
9
9
  return [
@@ -17,17 +17,13 @@ export async function createEslintPackageJsonConfig() {
17
17
  files: [ 'package.json', '**/package.json' ],
18
18
  rules: {
19
19
  'package-json/order-properties': [ 'error', { order: 'sort-package-json' } ],
20
- 'package-json/sort-collections': 'error',
21
-
22
- // Seems to break renovate finding changelogs
23
20
  'package-json/prefer-repository-shorthand': 'off',
24
- // Breaks workspace dependency linking
25
- // Invalid version range for dependency @darksheep/clone: workspace:~
26
- 'package-json/valid-package-def': 'warn',
27
-
21
+ 'package-json/repository-shorthand': [ 'error', { form: 'object' } ],
22
+ 'package-json/sort-collections': 'error',
28
23
  'package-json/unique-dependencies': 'error',
29
24
  'package-json/valid-local-dependency': 'error',
30
25
  'package-json/valid-name': 'error',
26
+ 'package-json/valid-package-def': 'warn',
31
27
  'package-json/valid-repository-directory': 'error',
32
28
  'package-json/valid-version': 'error',
33
29
  },
@@ -190,16 +190,25 @@ const moduleRules = {
190
190
 
191
191
  /** @type {import('eslint').Linter.RulesRecord} */
192
192
  const typescriptRules = {
193
+ 'perfectionist/sort-astro-attributes': 0,
194
+ 'perfectionist/sort-enums': 0,
193
195
  'perfectionist/sort-interfaces': 1,
196
+ 'perfectionist/sort-intersection-types': 0,
197
+ 'perfectionist/sort-jsx-props': 0,
194
198
  'perfectionist/sort-object-types': 1,
195
199
  'perfectionist/sort-objects': 1,
200
+ 'perfectionist/sort-sets': 0,
201
+ 'perfectionist/sort-svelte-attributes': 0,
202
+ 'perfectionist/sort-switch-case': 1,
196
203
  'perfectionist/sort-union-types': 1,
204
+ 'perfectionist/sort-variable-declarations': 0,
205
+ 'perfectionist/sort-vue-attributes': 0,
197
206
  };
198
207
 
199
208
  /**
200
- * Get ESLint config for imports check
201
- * @param {URL} root The root of the package being linted
202
- * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
209
+ * Get ESLint config for imports check.
210
+ * @param {URL} root - The root of the package being linted.
211
+ * @returns {Promise<import('eslint').Linter.Config[]>}
203
212
  */
204
213
  export async function createEslintPerfectionistConfig(root) {
205
214
  return [
@@ -1,8 +1,8 @@
1
1
  import promise from 'eslint-plugin-promise';
2
2
 
3
3
  /**
4
- * Get ESLint config for the promise plugin
5
- * @returns {import('eslint').Linter.FlatConfig[]}
4
+ * Get ESLint config for the promise plugin.
5
+ * @returns {import('eslint').Linter.Config[]}
6
6
  */
7
7
  export function createEslintPromiseConfig() {
8
8
  return [ {
@@ -11,7 +11,11 @@ export function createEslintPromiseConfig() {
11
11
  rules: {
12
12
  ...promise.configs.recommended.rules,
13
13
  'promise/catch-or-return': [ 'error', { allowFinally: true } ],
14
+ 'promise/no-multiple-resolved': 'error',
14
15
  'promise/no-return-wrap': [ 'error', { allowReject: true } ],
16
+ 'promise/prefer-await-to-callbacks': 'off',
17
+ 'promise/prefer-await-to-then': 'off',
18
+ 'promise/spec-only': 'error',
15
19
  },
16
20
  } ];
17
21
  }
@@ -89,9 +89,9 @@ const rules = {
89
89
  };
90
90
 
91
91
  /**
92
- * Get ESLint config for imports check
93
- * @param {URL} root The root of the package being linted
94
- * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
92
+ * Get ESLint config for imports check.
93
+ * @param {URL} root - The root of the package being linted.
94
+ * @returns {Promise<import('eslint').Linter.Config[]>}
95
95
  */
96
96
  export async function createEslintReactConfig(root) {
97
97
  const packageJson = await getPackageJson(root, 'react');
@@ -1,14 +1,107 @@
1
1
  import regexp from 'eslint-plugin-regexp';
2
2
 
3
3
  /**
4
- * Get ESLint config for the regexp plugin
5
- * @returns {import('eslint').Linter.FlatConfig[]}
4
+ * Get ESLint config for the regexp plugin.
5
+ * @returns {import('eslint').Linter.Config[]}
6
6
  */
7
7
  export function createEslintRegexpConfig() {
8
8
  return [
9
9
  {
10
10
  name: 'regexp/recommended',
11
- ...regexp.configs['flat/recommended'],
11
+ plugins: { regexp },
12
+ rules: {
13
+ 'no-control-regex': 'error',
14
+ 'no-empty-character-class': 'off',
15
+ 'no-invalid-regexp': 'off',
16
+ 'no-misleading-character-class': 'error',
17
+ 'no-regex-spaces': 'error',
18
+ 'no-useless-backreference': 'off',
19
+ 'prefer-regex-literals': 'error',
20
+ 'require-unicode-regexp': 'off',
21
+
22
+ 'regexp/confusing-quantifier': 'warn',
23
+ 'regexp/control-character-escape': 'error',
24
+ 'regexp/grapheme-string-literal': 'error',
25
+ 'regexp/hexadecimal-escape': [ 'error', 'never' ],
26
+ 'regexp/letter-case': 'error',
27
+ 'regexp/match-any': 'error',
28
+ 'regexp/negation': 'error',
29
+ 'regexp/no-contradiction-with-assertion': 'error',
30
+ 'regexp/no-control-character': 'error',
31
+ 'regexp/no-dupe-characters-character-class': 'error',
32
+ 'regexp/no-dupe-disjunctions': 'error',
33
+ 'regexp/no-empty-alternative': 'warn',
34
+ 'regexp/no-empty-capturing-group': 'error',
35
+ 'regexp/no-empty-character-class': 'error',
36
+ 'regexp/no-empty-group': 'error',
37
+ 'regexp/no-empty-lookarounds-assertion': 'error',
38
+ 'regexp/no-empty-string-literal': 'error',
39
+ 'regexp/no-escape-backspace': 'error',
40
+ 'regexp/no-extra-lookaround-assertions': 'error',
41
+ 'regexp/no-invalid-regexp': 'error',
42
+ 'regexp/no-invisible-character': 'error',
43
+ 'regexp/no-lazy-ends': 'warn',
44
+ 'regexp/no-legacy-features': 'error',
45
+ 'regexp/no-misleading-capturing-group': 'error',
46
+ 'regexp/no-misleading-unicode-character': 'error',
47
+ 'regexp/no-missing-g-flag': 'error',
48
+ 'regexp/no-non-standard-flag': 'error',
49
+ 'regexp/no-obscure-range': 'error',
50
+ 'regexp/no-octal': 'error',
51
+ 'regexp/no-optional-assertion': 'error',
52
+ 'regexp/no-potentially-useless-backreference': 'warn',
53
+ 'regexp/no-standalone-backslash': 'error',
54
+ 'regexp/no-super-linear-backtracking': 'error',
55
+ 'regexp/no-super-linear-move': 'error',
56
+ 'regexp/no-trivially-nested-assertion': 'error',
57
+ 'regexp/no-trivially-nested-quantifier': 'error',
58
+ 'regexp/no-unused-capturing-group': 'error',
59
+ 'regexp/no-useless-assertions': 'error',
60
+ 'regexp/no-useless-backreference': 'error',
61
+ 'regexp/no-useless-character-class': 'error',
62
+ 'regexp/no-useless-dollar-replacements': 'error',
63
+ 'regexp/no-useless-escape': 'error',
64
+ 'regexp/no-useless-flag': 'warn',
65
+ 'regexp/no-useless-lazy': 'error',
66
+ 'regexp/no-useless-non-capturing-group': 'error',
67
+ 'regexp/no-useless-quantifier': 'error',
68
+ 'regexp/no-useless-range': 'error',
69
+ 'regexp/no-useless-set-operand': 'error',
70
+ 'regexp/no-useless-string-literal': 'error',
71
+ 'regexp/no-useless-two-nums-quantifier': 'error',
72
+ 'regexp/no-zero-quantifier': 'error',
73
+ 'regexp/optimal-lookaround-quantifier': 'warn',
74
+ 'regexp/optimal-quantifier-concatenation': 'error',
75
+ 'regexp/prefer-character-class': 'error',
76
+ 'regexp/prefer-d': 'error',
77
+ 'regexp/prefer-escape-replacement-dollar-char': 'error',
78
+ 'regexp/prefer-lookaround': 'error',
79
+ 'regexp/prefer-named-backreference': 'error',
80
+ 'regexp/prefer-named-capture-group': 'error',
81
+ 'regexp/prefer-named-replacement': 'error',
82
+ 'regexp/prefer-plus-quantifier': 'error',
83
+ 'regexp/prefer-predefined-assertion': 'error',
84
+ 'regexp/prefer-quantifier': 'error',
85
+ 'regexp/prefer-question-quantifier': 'error',
86
+ 'regexp/prefer-range': 'error',
87
+ 'regexp/prefer-regexp-exec': 'error',
88
+ 'regexp/prefer-regexp-test': 'error',
89
+ 'regexp/prefer-result-array-groups': 'error',
90
+ 'regexp/prefer-set-operation': 'error',
91
+ 'regexp/prefer-star-quantifier': 'error',
92
+ 'regexp/prefer-unicode-codepoint-escapes': 'error',
93
+ 'regexp/prefer-w': 'error',
94
+ 'regexp/require-unicode-regexp': 'error',
95
+ 'regexp/require-unicode-sets-regexp': 'off',
96
+ 'regexp/simplify-set-operations': 'error',
97
+ 'regexp/sort-alternatives': 'off',
98
+ 'regexp/sort-character-class-elements': 'error',
99
+ 'regexp/sort-flags': 'error',
100
+ 'regexp/strict': 'error',
101
+ 'regexp/unicode-escape': 'error',
102
+ 'regexp/unicode-property': 'error',
103
+ 'regexp/use-ignore-case': 'error',
104
+ },
12
105
  },
13
106
  ];
14
107
  }
@@ -7,9 +7,9 @@ import {
7
7
  } from '../utilities/eslint-files.js';
8
8
 
9
9
  /**
10
- * Get ESLint config for the sca plugin
11
- * @param {URL} root The root url of the package we are linting
12
- * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
10
+ * Get ESLint config for the sca plugin.
11
+ * @param {URL} root - The root url of the package we are linting.
12
+ * @returns {Promise<import('eslint').Linter.Config[]>}
13
13
  */
14
14
  export async function createEslintSCAConfig(root) {
15
15
  return [
@@ -1,8 +1,8 @@
1
1
  import security from 'eslint-plugin-security';
2
2
 
3
3
  /**
4
- * Get ESLint config for the security plugin
5
- * @returns {import('eslint').Linter.FlatConfig[]}
4
+ * Get ESLint config for the security plugin.
5
+ * @returns {import('eslint').Linter.Config[]}
6
6
  */
7
7
  export function createEslintSecurityConfig() {
8
8
  return [ {