@jakubmazanec/eslint-config 3.3.2 → 4.0.0-next.80f405d
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/build/configs/main.d.ts +2 -0
- package/build/configs/main.js +204 -0
- package/build/configs/main.js.map +7 -0
- package/build/configs/nodejs.d.ts +2 -0
- package/build/configs/nodejs.js +27 -0
- package/build/configs/nodejs.js.map +7 -0
- package/build/configs/prettier.d.ts +2 -0
- package/build/configs/prettier.js +16 -0
- package/build/configs/prettier.js.map +7 -0
- package/build/configs.d.ts +3 -0
- package/build/configs.js +5 -0
- package/build/configs.js.map +7 -0
- package/build/constants.d.ts +1 -0
- package/build/constants.js +9 -48
- package/build/constants.js.map +2 -2
- package/build/main.d.ts +1 -3
- package/build/main.js +1 -29
- package/build/main.js.map +2 -2
- package/build/modules.d.js +2 -0
- package/build/modules.d.js.map +7 -0
- package/build/rules/a11y.d.ts +1 -2
- package/build/rules/a11y.js +1 -24
- package/build/rules/a11y.js.map +2 -2
- package/build/rules/comments.d.ts +2 -0
- package/build/rules/comments.js +23 -0
- package/build/rules/comments.js.map +7 -0
- package/build/rules/eslint.d.ts +1 -2
- package/build/rules/eslint.js +6 -44
- package/build/rules/eslint.js.map +2 -2
- package/build/rules/import.d.ts +1 -2
- package/build/rules/import.js +15 -44
- package/build/rules/import.js.map +2 -2
- package/build/rules/nodejs.d.ts +2 -0
- package/build/rules/{node.js → nodejs.js} +10 -34
- package/build/rules/nodejs.js.map +7 -0
- package/build/rules/perfectionist.d.ts +2 -0
- package/build/rules/perfectionist.js +158 -0
- package/build/rules/perfectionist.js.map +7 -0
- package/build/rules/prettier.d.ts +1 -2
- package/build/rules/prettier.js +1 -24
- package/build/rules/prettier.js.map +2 -2
- package/build/rules/promise.d.ts +1 -2
- package/build/rules/promise.js +3 -24
- package/build/rules/promise.js.map +2 -2
- package/build/rules/react-compiler.d.ts +2 -0
- package/build/rules/react-compiler.js +6 -0
- package/build/rules/react-compiler.js.map +7 -0
- package/build/rules/react-hooks.d.ts +1 -2
- package/build/rules/react-hooks.js +1 -24
- package/build/rules/react-hooks.js.map +2 -2
- package/build/rules/react.d.ts +1 -2
- package/build/rules/react.js +8 -33
- package/build/rules/react.js.map +2 -2
- package/build/rules/security.d.ts +2 -0
- package/build/rules/security.js +33 -0
- package/build/rules/security.js.map +7 -0
- package/build/rules/stylistic.d.ts +1 -2
- package/build/rules/stylistic.js +104 -117
- package/build/rules/stylistic.js.map +2 -2
- package/build/rules/testing-library.d.ts +1 -2
- package/build/rules/testing-library.js +2 -25
- package/build/rules/testing-library.js.map +2 -2
- package/build/rules/typescript.d.ts +1 -2
- package/build/rules/typescript.js +46 -52
- package/build/rules/typescript.js.map +2 -2
- package/build/rules/unicorn.d.ts +1 -2
- package/build/rules/unicorn.js +28 -25
- package/build/rules/unicorn.js.map +2 -2
- package/build/rules/vitest.d.ts +1 -2
- package/build/rules/vitest.js +22 -26
- package/build/rules/vitest.js.map +2 -2
- package/build/rules.d.ts +17 -0
- package/build/rules.js +19 -0
- package/build/rules.js.map +7 -0
- package/package.json +29 -28
- package/source/configs/main.ts +208 -0
- package/source/configs/nodejs.ts +29 -0
- package/source/configs/prettier.ts +18 -0
- package/source/configs.ts +3 -0
- package/source/constants.ts +1 -0
- package/source/main.ts +1 -12
- package/source/modules.d.ts +7 -0
- package/source/rules/a11y.ts +1 -3
- package/source/rules/{eslint-comments.ts → comments.ts} +1 -3
- package/source/rules/eslint.ts +5 -10
- package/source/rules/import.ts +5 -13
- package/source/rules/{node.ts → nodejs.ts} +6 -10
- package/source/rules/perfectionist.ts +141 -0
- package/source/rules/prettier.ts +1 -3
- package/source/rules/promise.ts +2 -3
- package/source/rules/react-compiler.ts +6 -0
- package/source/rules/react-hooks.ts +1 -3
- package/source/rules/react.ts +5 -12
- package/source/rules/security.ts +19 -0
- package/source/rules/stylistic.ts +99 -95
- package/source/rules/testing-library.ts +2 -4
- package/source/rules/typescript.ts +32 -22
- package/source/rules/unicorn.ts +15 -4
- package/source/rules/vitest.ts +12 -5
- package/source/rules.ts +17 -0
- package/build/presets/base.d.ts +0 -3
- package/build/presets/base.js +0 -175
- package/build/presets/base.js.map +0 -7
- package/build/presets/nodejs.d.ts +0 -3
- package/build/presets/nodejs.js +0 -47
- package/build/presets/nodejs.js.map +0 -7
- package/build/presets/prettier.d.ts +0 -3
- package/build/presets/prettier.js +0 -33
- package/build/presets/prettier.js.map +0 -7
- package/build/resolvers/graphql.d.ts +0 -5
- package/build/resolvers/graphql.js +0 -38
- package/build/resolvers/graphql.js.map +0 -7
- package/build/rules/eslint-comments.d.ts +0 -3
- package/build/rules/eslint-comments.js +0 -46
- package/build/rules/eslint-comments.js.map +0 -7
- package/build/rules/node.d.ts +0 -3
- package/build/rules/node.js.map +0 -7
- package/build/rules/simple-import-sort.d.ts +0 -3
- package/build/rules/simple-import-sort.js +0 -38
- package/build/rules/simple-import-sort.js.map +0 -7
- package/source/presets/base.ts +0 -162
- package/source/presets/nodejs.ts +0 -27
- package/source/presets/prettier.ts +0 -13
- package/source/resolvers/graphql.ts +0 -11
- package/source/rules/simple-import-sort.ts +0 -17
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import commentsEslintPlugin from "@eslint-community/eslint-plugin-eslint-comments";
|
|
3
|
+
import stylisticEslintPlugin from "@stylistic/eslint-plugin";
|
|
4
|
+
import typescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
5
|
+
import typescriptEslintParser from "@typescript-eslint/parser";
|
|
6
|
+
import vitestEslintPlugin from "@vitest/eslint-plugin";
|
|
7
|
+
import importEslintPlugin from "eslint-plugin-import";
|
|
8
|
+
import a11yEslintPlugin from "eslint-plugin-jsx-a11y";
|
|
9
|
+
import perfectionistEslintPlugin from "eslint-plugin-perfectionist";
|
|
10
|
+
import promiseEslintPlugin from "eslint-plugin-promise";
|
|
11
|
+
import reactEslintPlugin from "eslint-plugin-react";
|
|
12
|
+
import reactCompilerEslintPlugin from "eslint-plugin-react-compiler";
|
|
13
|
+
import reactHooksEslintPlugin from "eslint-plugin-react-hooks";
|
|
14
|
+
import securityEslintPlugin from "eslint-plugin-security";
|
|
15
|
+
import testingLibraryEslintPlugin from "eslint-plugin-testing-library";
|
|
16
|
+
import unicornEslintPlugin from "eslint-plugin-unicorn";
|
|
17
|
+
import globals from "globals";
|
|
18
|
+
import {
|
|
19
|
+
ASSET_EXTENSIONS_REGEXP,
|
|
20
|
+
CSS_EXTENSIONS_REGEXP,
|
|
21
|
+
GRAPHQL_EXTENSIONS_REGEXP,
|
|
22
|
+
JS_AND_TS_EXTENSIONS,
|
|
23
|
+
JS_AND_TS_EXTENSIONS_GLOB_PART,
|
|
24
|
+
TS_EXTENSIONS,
|
|
25
|
+
TS_EXTENSIONS_GLOB_PART
|
|
26
|
+
} from "../constants.js";
|
|
27
|
+
import {
|
|
28
|
+
a11yRules,
|
|
29
|
+
commentsRules,
|
|
30
|
+
eslintRules,
|
|
31
|
+
importRules,
|
|
32
|
+
perfectionistRules,
|
|
33
|
+
promiseRules,
|
|
34
|
+
reactCompilerRules,
|
|
35
|
+
reactHooksRules,
|
|
36
|
+
reactRules,
|
|
37
|
+
securityRules,
|
|
38
|
+
stylisticRules,
|
|
39
|
+
testingLibraryRules,
|
|
40
|
+
typescriptRules,
|
|
41
|
+
unicornRules,
|
|
42
|
+
vitestRules
|
|
43
|
+
} from "../rules.js";
|
|
44
|
+
export const main = [
|
|
45
|
+
{
|
|
46
|
+
linterOptions: {
|
|
47
|
+
reportUnusedDisableDirectives: "error"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
files: [`**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],
|
|
52
|
+
languageOptions: {
|
|
53
|
+
ecmaVersion: 2024,
|
|
54
|
+
parserOptions: {
|
|
55
|
+
ecmaFeatures: { jsx: true }
|
|
56
|
+
},
|
|
57
|
+
globals: {
|
|
58
|
+
...globals.builtin,
|
|
59
|
+
...globals.browser,
|
|
60
|
+
...globals.es2024,
|
|
61
|
+
...globals.serviceworker,
|
|
62
|
+
...globals.worker
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
// TODO: fix the type essertions
|
|
66
|
+
plugins: {
|
|
67
|
+
"@stylistic/js": stylisticEslintPlugin,
|
|
68
|
+
"eslint-comments": commentsEslintPlugin,
|
|
69
|
+
import: importEslintPlugin,
|
|
70
|
+
"jsx-a11y": a11yEslintPlugin,
|
|
71
|
+
// type assertions needed because of `exactOptionalPropertyTypes: true`
|
|
72
|
+
promise: promiseEslintPlugin,
|
|
73
|
+
react: reactEslintPlugin,
|
|
74
|
+
"react-hooks": reactHooksEslintPlugin,
|
|
75
|
+
unicorn: unicornEslintPlugin,
|
|
76
|
+
// type assertions needed because of `exactOptionalPropertyTypes: true`
|
|
77
|
+
security: securityEslintPlugin,
|
|
78
|
+
"react-compiler": reactCompilerEslintPlugin,
|
|
79
|
+
perfectionist: perfectionistEslintPlugin
|
|
80
|
+
},
|
|
81
|
+
settings: {
|
|
82
|
+
"import/ignore": [
|
|
83
|
+
"node_modules",
|
|
84
|
+
String.raw`\.json$`,
|
|
85
|
+
ASSET_EXTENSIONS_REGEXP.source,
|
|
86
|
+
CSS_EXTENSIONS_REGEXP.source,
|
|
87
|
+
GRAPHQL_EXTENSIONS_REGEXP.source
|
|
88
|
+
],
|
|
89
|
+
react: {
|
|
90
|
+
version: "detect"
|
|
91
|
+
},
|
|
92
|
+
propWrapperFunctions: ["forbidExtraProps", "exact", "Object.freeze"],
|
|
93
|
+
"jsx-a11y": {
|
|
94
|
+
polymorphicPropName: "as",
|
|
95
|
+
components: {
|
|
96
|
+
Button: "button"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
rules: {
|
|
101
|
+
...a11yRules,
|
|
102
|
+
...commentsRules,
|
|
103
|
+
...eslintRules,
|
|
104
|
+
...importRules,
|
|
105
|
+
...perfectionistRules,
|
|
106
|
+
...promiseRules,
|
|
107
|
+
...reactCompilerRules,
|
|
108
|
+
...reactHooksRules,
|
|
109
|
+
...reactRules,
|
|
110
|
+
...securityRules,
|
|
111
|
+
...stylisticRules,
|
|
112
|
+
...unicornRules
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
files: [`**/*.test.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],
|
|
117
|
+
languageOptions: {
|
|
118
|
+
parser: typescriptEslintParser,
|
|
119
|
+
globals: {
|
|
120
|
+
...globals.node,
|
|
121
|
+
...vitestEslintPlugin.environments.env.globals,
|
|
122
|
+
jsdom: "readonly"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
plugins: {
|
|
126
|
+
vitest: vitestEslintPlugin,
|
|
127
|
+
"testing-library": testingLibraryEslintPlugin
|
|
128
|
+
},
|
|
129
|
+
settings: {
|
|
130
|
+
vitest: {
|
|
131
|
+
typecheck: true
|
|
132
|
+
},
|
|
133
|
+
"testing-library/custom-queries": "off",
|
|
134
|
+
"testing-library/custom-renders": "off",
|
|
135
|
+
"testing-library/utils-module": "off"
|
|
136
|
+
},
|
|
137
|
+
rules: {
|
|
138
|
+
...vitestRules,
|
|
139
|
+
...testingLibraryRules,
|
|
140
|
+
// override ESLint rules
|
|
141
|
+
"max-classes-per-file": "off",
|
|
142
|
+
// enforce a maximum number of classes per file
|
|
143
|
+
// override eslint-plugin-node rules
|
|
144
|
+
"node/no-sync": "off"
|
|
145
|
+
// disallow synchronous methods
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
files: [`**/*.${TS_EXTENSIONS_GLOB_PART}`],
|
|
150
|
+
languageOptions: {
|
|
151
|
+
parser: typescriptEslintParser,
|
|
152
|
+
parserOptions: {
|
|
153
|
+
project: "tsconfig.typecheck.json"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
// TODO: fix the type essertion
|
|
157
|
+
plugins: {
|
|
158
|
+
"@typescript-eslint": typescriptEslintPlugin
|
|
159
|
+
},
|
|
160
|
+
settings: {
|
|
161
|
+
node: {
|
|
162
|
+
tryExtensions: JS_AND_TS_EXTENSIONS
|
|
163
|
+
},
|
|
164
|
+
"import/resolver": {
|
|
165
|
+
typescript: {}
|
|
166
|
+
},
|
|
167
|
+
"import/parsers": {
|
|
168
|
+
"@typescript-eslint/parser": TS_EXTENSIONS
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
rules: {
|
|
172
|
+
...typescriptRules,
|
|
173
|
+
// override eslint-plugin-import rules
|
|
174
|
+
"import/no-extraneous-dependencies": [
|
|
175
|
+
"error",
|
|
176
|
+
{
|
|
177
|
+
devDependencies: [
|
|
178
|
+
`**/*.test.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,
|
|
179
|
+
`**/*.tests.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,
|
|
180
|
+
`**/*.stories.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,
|
|
181
|
+
`./.storybook/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,
|
|
182
|
+
`dbschema/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,
|
|
183
|
+
`stories/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,
|
|
184
|
+
`tests/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,
|
|
185
|
+
`tools/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,
|
|
186
|
+
`./*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`
|
|
187
|
+
],
|
|
188
|
+
optionalDependencies: false
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
files: [`**/*.test.${TS_EXTENSIONS_GLOB_PART}`],
|
|
195
|
+
rules: {
|
|
196
|
+
// override @typescript-eslint/eslint-plugin rules
|
|
197
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
198
|
+
// bans // @ts-<directive> comments from being used
|
|
199
|
+
"@typescript-eslint/no-floating-promises": "off"
|
|
200
|
+
// requires Promise-like values to be handled appropriately
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
];
|
|
204
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../source/configs/main.ts"],
|
|
4
|
+
"sourcesContent": ["import commentsEslintPlugin from '@eslint-community/eslint-plugin-eslint-comments';\nimport stylisticEslintPlugin from '@stylistic/eslint-plugin';\nimport typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';\nimport typescriptEslintParser from '@typescript-eslint/parser';\nimport vitestEslintPlugin from '@vitest/eslint-plugin';\nimport {type default as eslint, type ESLint} from 'eslint';\nimport importEslintPlugin from 'eslint-plugin-import';\nimport a11yEslintPlugin from 'eslint-plugin-jsx-a11y';\nimport perfectionistEslintPlugin from 'eslint-plugin-perfectionist';\nimport promiseEslintPlugin from 'eslint-plugin-promise';\nimport reactEslintPlugin from 'eslint-plugin-react';\nimport reactCompilerEslintPlugin from 'eslint-plugin-react-compiler';\nimport reactHooksEslintPlugin from 'eslint-plugin-react-hooks';\nimport securityEslintPlugin from 'eslint-plugin-security';\nimport testingLibraryEslintPlugin from 'eslint-plugin-testing-library';\nimport unicornEslintPlugin from 'eslint-plugin-unicorn';\nimport globals from 'globals';\n\nimport {\n ASSET_EXTENSIONS_REGEXP,\n CSS_EXTENSIONS_REGEXP,\n GRAPHQL_EXTENSIONS_REGEXP,\n JS_AND_TS_EXTENSIONS,\n JS_AND_TS_EXTENSIONS_GLOB_PART,\n TS_EXTENSIONS,\n TS_EXTENSIONS_GLOB_PART,\n} from '../constants.js';\nimport {\n a11yRules,\n commentsRules,\n eslintRules,\n importRules,\n perfectionistRules,\n promiseRules,\n reactCompilerRules,\n reactHooksRules,\n reactRules,\n securityRules,\n stylisticRules,\n testingLibraryRules,\n typescriptRules,\n unicornRules,\n vitestRules,\n} from '../rules.js';\n\nexport const main: eslint.Linter.Config[] = [\n {\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n },\n },\n {\n files: [`**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],\n\n languageOptions: {\n ecmaVersion: 2024,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n },\n globals: {\n ...globals.builtin,\n ...globals.browser,\n ...globals.es2024,\n ...globals.serviceworker,\n ...globals.worker,\n },\n },\n // TODO: fix the type essertions\n plugins: {\n '@stylistic/js': stylisticEslintPlugin as ESLint.Plugin,\n 'eslint-comments': commentsEslintPlugin as ESLint.Plugin,\n import: importEslintPlugin as ESLint.Plugin,\n 'jsx-a11y': a11yEslintPlugin as ESLint.Plugin, // type assertions needed because of `exactOptionalPropertyTypes: true`\n promise: promiseEslintPlugin as ESLint.Plugin,\n react: reactEslintPlugin as unknown as ESLint.Plugin,\n 'react-hooks': reactHooksEslintPlugin as ESLint.Plugin,\n unicorn: unicornEslintPlugin as ESLint.Plugin, // type assertions needed because of `exactOptionalPropertyTypes: true`\n security: securityEslintPlugin as ESLint.Plugin,\n 'react-compiler': reactCompilerEslintPlugin as ESLint.Plugin,\n perfectionist: perfectionistEslintPlugin as unknown as ESLint.Plugin,\n },\n\n settings: {\n 'import/ignore': [\n 'node_modules',\n String.raw`\\.json$`,\n ASSET_EXTENSIONS_REGEXP.source,\n CSS_EXTENSIONS_REGEXP.source,\n GRAPHQL_EXTENSIONS_REGEXP.source,\n ],\n react: {\n version: 'detect',\n },\n propWrapperFunctions: ['forbidExtraProps', 'exact', 'Object.freeze'],\n 'jsx-a11y': {\n polymorphicPropName: 'as',\n components: {\n Button: 'button',\n },\n },\n },\n\n rules: {\n ...a11yRules,\n ...commentsRules,\n ...eslintRules,\n ...importRules,\n ...perfectionistRules,\n ...promiseRules,\n ...reactCompilerRules,\n ...reactHooksRules,\n ...reactRules,\n ...securityRules,\n ...stylisticRules,\n ...unicornRules,\n },\n },\n {\n files: [`**/*.test.${JS_AND_TS_EXTENSIONS_GLOB_PART}`],\n\n languageOptions: {\n parser: typescriptEslintParser,\n globals: {\n ...globals.node,\n ...vitestEslintPlugin.environments.env.globals,\n jsdom: 'readonly',\n },\n },\n plugins: {\n vitest: vitestEslintPlugin,\n 'testing-library': testingLibraryEslintPlugin as ESLint.Plugin,\n },\n settings: {\n vitest: {\n typecheck: true,\n },\n 'testing-library/custom-queries': 'off',\n 'testing-library/custom-renders': 'off',\n 'testing-library/utils-module': 'off',\n },\n rules: {\n ...vitestRules,\n ...testingLibraryRules,\n\n // override ESLint rules\n 'max-classes-per-file': 'off', // enforce a maximum number of classes per file\n\n // override eslint-plugin-node rules\n 'node/no-sync': 'off', // disallow synchronous methods\n },\n },\n {\n files: [`**/*.${TS_EXTENSIONS_GLOB_PART}`],\n\n languageOptions: {\n parser: typescriptEslintParser,\n parserOptions: {\n project: 'tsconfig.typecheck.json',\n },\n },\n // TODO: fix the type essertion\n plugins: {\n '@typescript-eslint': typescriptEslintPlugin as unknown as ESLint.Plugin,\n },\n settings: {\n node: {\n tryExtensions: JS_AND_TS_EXTENSIONS,\n },\n 'import/resolver': {\n typescript: {},\n },\n 'import/parsers': {\n '@typescript-eslint/parser': TS_EXTENSIONS,\n },\n },\n rules: {\n ...typescriptRules,\n\n // override eslint-plugin-import rules\n 'import/no-extraneous-dependencies': [\n 'error',\n {\n devDependencies: [\n `**/*.test.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,\n `**/*.tests.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,\n `**/*.stories.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,\n `./.storybook/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,\n `dbschema/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,\n `stories/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,\n `tests/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,\n `tools/**/*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,\n `./*.${JS_AND_TS_EXTENSIONS_GLOB_PART}`,\n ],\n optionalDependencies: false,\n },\n ],\n },\n },\n {\n files: [`**/*.test.${TS_EXTENSIONS_GLOB_PART}`],\n\n rules: {\n // override @typescript-eslint/eslint-plugin rules\n '@typescript-eslint/ban-ts-comment': 'off', // bans // @ts-<directive> comments from being used\n '@typescript-eslint/no-floating-promises': 'off', // requires Promise-like values to be handled appropriately\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,0BAA0B;AACjC,OAAO,2BAA2B;AAClC,OAAO,4BAA4B;AACnC,OAAO,4BAA4B;AACnC,OAAO,wBAAwB;AAE/B,OAAO,wBAAwB;AAC/B,OAAO,sBAAsB;AAC7B,OAAO,+BAA+B;AACtC,OAAO,yBAAyB;AAChC,OAAO,uBAAuB;AAC9B,OAAO,+BAA+B;AACtC,OAAO,4BAA4B;AACnC,OAAO,0BAA0B;AACjC,OAAO,gCAAgC;AACvC,OAAO,yBAAyB;AAChC,OAAO,aAAa;AAEpB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,aAAM,OAA+B;AAAA,EAC1C;AAAA,IACE,eAAe;AAAA,MACb,+BAA+B;AAAA,IACjC;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,QAAQ,8BAA8B,EAAE;AAAA,IAEhD,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,eAAe;AAAA,QACb,cAAc,EAAC,KAAK,KAAI;AAAA,MAC1B;AAAA,MACA,SAAS;AAAA,QACP,GAAG,QAAQ;AAAA,QACX,GAAG,QAAQ;AAAA,QACX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
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import nEslintPlugin from "eslint-plugin-n";
|
|
3
|
+
import globals from "globals";
|
|
4
|
+
import { JS_AND_TS_EXTENSIONS } from "../constants.js";
|
|
5
|
+
import { nodejsRules } from "../rules.js";
|
|
6
|
+
export const nodejs = [
|
|
7
|
+
{
|
|
8
|
+
languageOptions: {
|
|
9
|
+
globals: {
|
|
10
|
+
...globals.node
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
// TODO: fix the type essertion
|
|
14
|
+
plugins: {
|
|
15
|
+
node: nEslintPlugin
|
|
16
|
+
},
|
|
17
|
+
settings: {
|
|
18
|
+
node: {
|
|
19
|
+
tryExtensions: JS_AND_TS_EXTENSIONS
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
...nodejsRules
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
//# sourceMappingURL=nodejs.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../source/configs/nodejs.ts"],
|
|
4
|
+
"sourcesContent": ["import {type default as eslint, type ESLint} from 'eslint';\nimport nEslintPlugin from 'eslint-plugin-n';\nimport globals from 'globals';\n\nimport {JS_AND_TS_EXTENSIONS} from '../constants.js';\nimport {nodejsRules} from '../rules.js';\n\nexport const nodejs: eslint.Linter.Config[] = [\n {\n languageOptions: {\n globals: {\n ...globals.node,\n },\n },\n // TODO: fix the type essertion\n plugins: {\n node: nEslintPlugin as ESLint.Plugin,\n },\n settings: {\n node: {\n tryExtensions: JS_AND_TS_EXTENSIONS,\n },\n },\n\n rules: {\n ...nodejsRules,\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";AACA,OAAO,mBAAmB;AAC1B,OAAO,aAAa;AAEpB,SAAQ,4BAA2B;AACnC,SAAQ,mBAAkB;AAEnB,aAAM,SAAiC;AAAA,EAC5C;AAAA,IACE,iBAAiB;AAAA,MACf,SAAS;AAAA,QACP,GAAG,QAAQ;AAAA,MACb;AAAA,IACF;AAAA;AAAA,IAEA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,IAEA,OAAO;AAAA,MACL,GAAG;AAAA,IACL;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import prettierEslintConfig from "eslint-config-prettier";
|
|
3
|
+
import prettierEslintPlugin from "eslint-plugin-prettier";
|
|
4
|
+
import { prettierRules } from "../rules.js";
|
|
5
|
+
export const prettier = [
|
|
6
|
+
prettierEslintConfig,
|
|
7
|
+
{
|
|
8
|
+
plugins: {
|
|
9
|
+
prettier: prettierEslintPlugin
|
|
10
|
+
},
|
|
11
|
+
rules: {
|
|
12
|
+
...prettierRules
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
//# sourceMappingURL=prettier.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../source/configs/prettier.ts"],
|
|
4
|
+
"sourcesContent": ["import {type default as eslint} from 'eslint';\nimport prettierEslintConfig from 'eslint-config-prettier';\nimport prettierEslintPlugin from 'eslint-plugin-prettier';\n\nimport {prettierRules} from '../rules.js';\n\nexport const prettier: eslint.Linter.Config[] = [\n prettierEslintConfig,\n {\n plugins: {\n prettier: prettierEslintPlugin,\n },\n\n rules: {\n ...prettierRules,\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";AACA,OAAO,0BAA0B;AACjC,OAAO,0BAA0B;AAEjC,SAAQ,qBAAoB;AAErB,aAAM,WAAmC;AAAA,EAC9C;AAAA,EACA;AAAA,IACE,SAAS;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,IAEA,OAAO;AAAA,MACL,GAAG;AAAA,IACL;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/build/configs.js
ADDED
package/build/constants.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const JS_AND_TS_EXTENSIONS: string[];
|
|
2
|
+
export declare const TS_EXTENSIONS: string[];
|
|
2
3
|
export declare const JS_EXTENSIONS_GLOB_PART = "{js,jsx,cjs,mjs}";
|
|
3
4
|
export declare const TS_EXTENSIONS_GLOB_PART = "{ts,tsx,cts,mts}";
|
|
4
5
|
export declare const JS_AND_TS_EXTENSIONS_GLOB_PART = "{js,jsx,cjs,mjs,ts,tsx,cts,mts}";
|
package/build/constants.js
CHANGED
|
@@ -1,34 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var constants_exports = {};
|
|
20
|
-
__export(constants_exports, {
|
|
21
|
-
ASSET_EXTENSIONS_REGEXP: () => ASSET_EXTENSIONS_REGEXP,
|
|
22
|
-
CSS_EXTENSIONS_REGEXP: () => CSS_EXTENSIONS_REGEXP,
|
|
23
|
-
GRAPHQL_EXTENSIONS_REGEXP: () => GRAPHQL_EXTENSIONS_REGEXP,
|
|
24
|
-
JS_AND_TS_EXTENSIONS: () => JS_AND_TS_EXTENSIONS,
|
|
25
|
-
JS_AND_TS_EXTENSIONS_GLOB_PART: () => JS_AND_TS_EXTENSIONS_GLOB_PART,
|
|
26
|
-
JS_AND_TS_EXTENSIONS_REGEXP: () => JS_AND_TS_EXTENSIONS_REGEXP,
|
|
27
|
-
JS_EXTENSIONS_GLOB_PART: () => JS_EXTENSIONS_GLOB_PART,
|
|
28
|
-
TS_EXTENSIONS_GLOB_PART: () => TS_EXTENSIONS_GLOB_PART
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(constants_exports);
|
|
31
|
-
const JS_AND_TS_EXTENSIONS = [
|
|
2
|
+
export const JS_AND_TS_EXTENSIONS = [
|
|
32
3
|
".ts",
|
|
33
4
|
".tsx",
|
|
34
5
|
".cts",
|
|
@@ -39,22 +10,12 @@ const JS_AND_TS_EXTENSIONS = [
|
|
|
39
10
|
".mjs",
|
|
40
11
|
".json"
|
|
41
12
|
];
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
0 && (module.exports = {
|
|
51
|
-
ASSET_EXTENSIONS_REGEXP,
|
|
52
|
-
CSS_EXTENSIONS_REGEXP,
|
|
53
|
-
GRAPHQL_EXTENSIONS_REGEXP,
|
|
54
|
-
JS_AND_TS_EXTENSIONS,
|
|
55
|
-
JS_AND_TS_EXTENSIONS_GLOB_PART,
|
|
56
|
-
JS_AND_TS_EXTENSIONS_REGEXP,
|
|
57
|
-
JS_EXTENSIONS_GLOB_PART,
|
|
58
|
-
TS_EXTENSIONS_GLOB_PART
|
|
59
|
-
});
|
|
13
|
+
export const TS_EXTENSIONS = [".ts", ".tsx", ".cts", ".mts"];
|
|
14
|
+
export const JS_EXTENSIONS_GLOB_PART = "{js,jsx,cjs,mjs}";
|
|
15
|
+
export const TS_EXTENSIONS_GLOB_PART = "{ts,tsx,cts,mts}";
|
|
16
|
+
export const JS_AND_TS_EXTENSIONS_GLOB_PART = "{js,jsx,cjs,mjs,ts,tsx,cts,mts}";
|
|
17
|
+
export const JS_AND_TS_EXTENSIONS_REGEXP = /\.(js|jsx|cjs|mjs|ts|tsx|cts|mts)$/;
|
|
18
|
+
export const ASSET_EXTENSIONS_REGEXP = /\.(ttf|eot|otf|svg|woff|woff2|mp3|png|jpg|jpeg|gif|ico)$/;
|
|
19
|
+
export const CSS_EXTENSIONS_REGEXP = /\.(css|scss)$/;
|
|
20
|
+
export const GRAPHQL_EXTENSIONS_REGEXP = /\.(gql|graphql)$/;
|
|
60
21
|
//# sourceMappingURL=constants.js.map
|
package/build/constants.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../source/constants.ts"],
|
|
4
|
-
"sourcesContent": ["export const JS_AND_TS_EXTENSIONS = [\n '.ts',\n '.tsx',\n '.cts',\n '.mts',\n '.js',\n '.jsx',\n '.cjs',\n '.mjs',\n '.json',\n];\n\nexport const JS_EXTENSIONS_GLOB_PART = '{js,jsx,cjs,mjs}';\nexport const TS_EXTENSIONS_GLOB_PART = '{ts,tsx,cts,mts}';\nexport const JS_AND_TS_EXTENSIONS_GLOB_PART = '{js,jsx,cjs,mjs,ts,tsx,cts,mts}';\n\nexport const JS_AND_TS_EXTENSIONS_REGEXP = /\\.(js|jsx|cjs|mjs|ts|tsx|cts|mts)$/;\nexport const ASSET_EXTENSIONS_REGEXP = /\\.(ttf|eot|otf|svg|woff|woff2|mp3|png|jpg|jpeg|gif|ico)$/;\nexport const CSS_EXTENSIONS_REGEXP = /\\.(css|scss)$/;\nexport const GRAPHQL_EXTENSIONS_REGEXP = /\\.(gql|graphql)$/;\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export const JS_AND_TS_EXTENSIONS = [\n '.ts',\n '.tsx',\n '.cts',\n '.mts',\n '.js',\n '.jsx',\n '.cjs',\n '.mjs',\n '.json',\n];\nexport const TS_EXTENSIONS = ['.ts', '.tsx', '.cts', '.mts'];\n\nexport const JS_EXTENSIONS_GLOB_PART = '{js,jsx,cjs,mjs}';\nexport const TS_EXTENSIONS_GLOB_PART = '{ts,tsx,cts,mts}';\nexport const JS_AND_TS_EXTENSIONS_GLOB_PART = '{js,jsx,cjs,mjs,ts,tsx,cts,mts}';\n\nexport const JS_AND_TS_EXTENSIONS_REGEXP = /\\.(js|jsx|cjs|mjs|ts|tsx|cts|mts)$/;\nexport const ASSET_EXTENSIONS_REGEXP = /\\.(ttf|eot|otf|svg|woff|woff2|mp3|png|jpg|jpeg|gif|ico)$/;\nexport const CSS_EXTENSIONS_REGEXP = /\\.(css|scss)$/;\nexport const GRAPHQL_EXTENSIONS_REGEXP = /\\.(gql|graphql)$/;\n"],
|
|
5
|
+
"mappings": ";AAAO,aAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,aAAM,gBAAgB,CAAC,OAAO,QAAQ,QAAQ,MAAM;AAEpD,aAAM,0BAA0B;AAChC,aAAM,0BAA0B;AAChC,aAAM,iCAAiC;AAEvC,aAAM,8BAA8B;AACpC,aAAM,0BAA0B;AAChC,aAAM,wBAAwB;AAC9B,aAAM,4BAA4B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/main.d.ts
CHANGED
package/build/main.js
CHANGED
|
@@ -1,31 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
let config = {
|
|
25
|
-
extends: [require.resolve("./presets/base.js")],
|
|
26
|
-
reportUnusedDisableDirectives: true,
|
|
27
|
-
// We can't define rules here otherwise they override the ones in the extending configs above. This is bad for actual `overrides`!
|
|
28
|
-
rules: {}
|
|
29
|
-
};
|
|
30
|
-
module.exports = config;
|
|
2
|
+
export { main as default, nodejs, prettier } from "./configs.js";
|
|
31
3
|
//# sourceMappingURL=main.js.map
|
package/build/main.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../source/main.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export {main as default, nodejs, prettier} from './configs.js';\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAQ,QAAQ,SAAS,QAAQ,gBAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/rules/a11y.d.ts
CHANGED
package/build/rules/a11y.js
CHANGED
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var a11y_exports = {};
|
|
20
|
-
__export(a11y_exports, {
|
|
21
|
-
default: () => a11y_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(a11y_exports);
|
|
24
|
-
const config = {
|
|
2
|
+
export const a11yRules = {
|
|
25
3
|
// eslint-plugin-jsx-a11y rules
|
|
26
4
|
"jsx-a11y/alt-text": "warn",
|
|
27
5
|
// enforce all elements that require alternative text have meaningful information to relay back to end user
|
|
@@ -102,5 +80,4 @@ const config = {
|
|
|
102
80
|
"jsx-a11y/tabindex-no-positive": "error"
|
|
103
81
|
// enforce tabIndex value is not greater than zero
|
|
104
82
|
};
|
|
105
|
-
var a11y_default = config;
|
|
106
83
|
//# sourceMappingURL=a11y.js.map
|
package/build/rules/a11y.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../source/rules/a11y.ts"],
|
|
4
|
-
"sourcesContent": ["import type eslint from 'eslint';\n\
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type eslint from 'eslint';\n\nexport const a11yRules: eslint.Linter.Config['rules'] = {\n // eslint-plugin-jsx-a11y rules\n 'jsx-a11y/alt-text': 'warn', // enforce all elements that require alternative text have meaningful information to relay back to end user\n 'jsx-a11y/anchor-ambiguous-text': 'off', // enforce <a> text to not exactly match \"click here\", \"here\", \"link\", or \"a link\"\n 'jsx-a11y/anchor-has-content': ['warn', {components: ['Link']}], // enforce all anchors to contain accessible content\n 'jsx-a11y/anchor-is-valid': [\n 'error',\n {\n components: ['Link'],\n specialLink: ['hrefLeft', 'hrefRight', 'to'],\n },\n ], // enforce all anchors are valid, navigable elements\n 'jsx-a11y/aria-activedescendant-has-tabindex': 'warn', // enforce elements with aria-active descendant are tab-able\n 'jsx-a11y/aria-props': 'error', // enforce all aria-* props are valid\n 'jsx-a11y/aria-proptypes': 'error', // enforce ARIA state and property values are valid\n 'jsx-a11y/aria-role': ['error', {ignoreNonDOM: false}], // enforce that elements with ARIA roles must use a valid, non-abstract ARIA role\n 'jsx-a11y/aria-unsupported-elements': 'error', // enforce that elements that do not support ARIA roles, states, and properties do not have those attributes\n 'jsx-a11y/autocomplete-valid': 'warn', // enforce that autocomplete attributes are used correctly.\n 'jsx-a11y/click-events-have-key-events': 'warn', // enforce a clickable non-interactive element has at least one keyboard event listener\n 'jsx-a11y/control-has-associated-label': 'warn', // enforce that a control (an interactive element) has a text label\n 'jsx-a11y/heading-has-content': ['warn', {components: ['Typography']}], // enforce heading (h1, h2, etc) elements contain accessible content\n 'jsx-a11y/html-has-lang': 'warn', // enforce <html> element has lang prop\n 'jsx-a11y/iframe-has-title': 'warn', // enforce iframe elements have a title attribute\n 'jsx-a11y/img-redundant-alt': 'warn', // enforce <img> alt prop does not contain the word \"image\", \"picture\", or \"photo\"\n 'jsx-a11y/interactive-supports-focus': 'warn', // enforce that elements with interactive handlers like onClick must be focusable\n 'jsx-a11y/label-has-associated-control': 'warn', // enforce that a label tag has a text label and an associated control\n 'jsx-a11y/lang': 'error', // enforce lang attribute has a valid value\n 'jsx-a11y/media-has-caption': 'warn', // enforces that <audio> and <video> elements must have a <track> for captions\n 'jsx-a11y/mouse-events-have-key-events': 'warn', // enforce that onMouseOver/onMouseOut are accompanied by onFocus/onBlur for keyboard-only users\n 'jsx-a11y/no-access-key': 'warn', // enforce that the accessKey prop is not used on any element to avoid complications with keyboard commands used by a screen reader\n 'jsx-a11y/no-aria-hidden-on-focusable': 'warn', // disallow aria-hidden=\"true\" from being set on focusable elements\n 'jsx-a11y/no-autofocus': 'off', // enforce autoFocus prop is not used\n 'jsx-a11y/no-distracting-elements': 'error', // enforce distracting elements are not used\n 'jsx-a11y/no-interactive-element-to-noninteractive-role': 'warn', // interactive elements should not be assigned non-interactive roles\n 'jsx-a11y/no-noninteractive-element-interactions': 'warn', // non-interactive elements should not be assigned mouse or keyboard event listeners\n 'jsx-a11y/no-noninteractive-element-to-interactive-role': 'warn', // Non-interactive elements should not be assigned interactive roles\n 'jsx-a11y/no-noninteractive-tabindex': 'error', // tabIndex should only be declared on interactive elements\n 'jsx-a11y/no-redundant-roles': 'error', // enforce explicit role property is not the same as implicit/default role property on element\n 'jsx-a11y/no-static-element-interactions': 'warn', // enforce that non-interactive, visible elements (such as <div>) that have click handlers use the role attribute\n 'jsx-a11y/prefer-tag-over-role': 'warn', // enforces using semantic DOM elements over the ARIA role property\n 'jsx-a11y/role-has-required-aria-props': 'error', // enforce that elements with ARIA roles must have all required attributes for that role\n 'jsx-a11y/role-supports-aria-props': 'error', // enforce that elements with explicit or implicit roles defined contain only aria-* properties supported by that role\n 'jsx-a11y/scope': 'error', // enforce scope prop is only used on <th> elements\n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,yCAAyC;AAAA;AAAA,EACzC,qCAAqC;AAAA;AAAA,EACrC,kBAAkB;AAAA;AAAA,EAClB,iCAAiC;AAAA;AACnC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
export const commentsRules = {
|
|
3
|
+
// eslint-plugin-eslint-comments rules
|
|
4
|
+
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
5
|
+
// require a eslint-enable comment for every eslint-disable comment
|
|
6
|
+
"eslint-comments/no-aggregating-enable": "error",
|
|
7
|
+
// disallow a eslint-enable comment for multiple eslint-disable comments
|
|
8
|
+
"eslint-comments/no-duplicate-disable": "error",
|
|
9
|
+
// disallow duplicate eslint-disable comments
|
|
10
|
+
"eslint-comments/no-restricted-disable": "off",
|
|
11
|
+
// disallow eslint-disable comments about specific rules
|
|
12
|
+
"eslint-comments/no-unlimited-disable": "error",
|
|
13
|
+
// disallow eslint-disable comments without rule names
|
|
14
|
+
"eslint-comments/no-unused-disable": "off",
|
|
15
|
+
// disallow unused eslint-disable comments
|
|
16
|
+
"eslint-comments/no-unused-enable": "error",
|
|
17
|
+
// disallow unused eslint-enable comments
|
|
18
|
+
"eslint-comments/no-use": "off",
|
|
19
|
+
// disallow ESLint directive-comments
|
|
20
|
+
"eslint-comments/require-description": ["error", { ignore: ["eslint-enable"] }]
|
|
21
|
+
// require include descriptions in ESLint directive-comments
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=comments.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../source/rules/comments.ts"],
|
|
4
|
+
"sourcesContent": ["import type eslint from 'eslint';\n\nexport const commentsRules: eslint.Linter.Config['rules'] = {\n // eslint-plugin-eslint-comments rules\n 'eslint-comments/disable-enable-pair': ['error', {allowWholeFile: true}], // require a eslint-enable comment for every eslint-disable comment\n 'eslint-comments/no-aggregating-enable': 'error', // disallow a eslint-enable comment for multiple eslint-disable comments\n 'eslint-comments/no-duplicate-disable': 'error', // disallow duplicate eslint-disable comments\n 'eslint-comments/no-restricted-disable': 'off', // disallow eslint-disable comments about specific rules\n 'eslint-comments/no-unlimited-disable': 'error', // disallow eslint-disable comments without rule names\n 'eslint-comments/no-unused-disable': 'off', // disallow unused eslint-disable comments\n 'eslint-comments/no-unused-enable': 'error', // disallow unused eslint-enable comments\n 'eslint-comments/no-use': 'off', // disallow ESLint directive-comments\n 'eslint-comments/require-description': ['error', {ignore: ['eslint-enable']}], // require include descriptions in ESLint directive-comments\n};\n"],
|
|
5
|
+
"mappings": ";AAEO,aAAM,gBAA+C;AAAA;AAAA,EAE1D,uCAAuC,CAAC,SAAS,EAAC,gBAAgB,KAAI,CAAC;AAAA;AAAA,EACvE,yCAAyC;AAAA;AAAA,EACzC,wCAAwC;AAAA;AAAA,EACxC,yCAAyC;AAAA;AAAA,EACzC,wCAAwC;AAAA;AAAA,EACxC,qCAAqC;AAAA;AAAA,EACrC,oCAAoC;AAAA;AAAA,EACpC,0BAA0B;AAAA;AAAA,EAC1B,uCAAuC,CAAC,SAAS,EAAC,QAAQ,CAAC,eAAe,EAAC,CAAC;AAAA;AAC9E;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/build/rules/eslint.d.ts
CHANGED