eslint-config-arklint 1.11.0 → 2.0.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.
@@ -0,0 +1,83 @@
1
+ import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
2
+ import reactHooksPlugin from "eslint-plugin-react-hooks";
3
+ import reactPlugin from "eslint-plugin-react";
4
+
5
+
6
+ export default [
7
+ reactPlugin.configs.flat.recommended,
8
+ reactPlugin.configs.flat["jsx-runtime"],
9
+ {
10
+ plugins: {
11
+ "react": reactPlugin,
12
+ "react-hooks": reactHooksPlugin,
13
+ "jsx-a11y": jsxA11yPlugin
14
+ },
15
+ languageOptions: {
16
+ parserOptions: {
17
+ ecmaFeatures: {
18
+ jsx: true
19
+ },
20
+ babelOptions: {
21
+ presets: ["@babel/preset-react"]
22
+ }
23
+ }
24
+ },
25
+ settings: {
26
+ react: {
27
+ version: "detect"
28
+ }
29
+ },
30
+ rules: {
31
+ "jsx-a11y/alt-text": "warn",
32
+ "jsx-a11y/anchor-has-content": "warn",
33
+ "jsx-a11y/anchor-is-valid": ["warn", {
34
+ aspects: ["noHref", "invalidHref"]
35
+ }],
36
+ "jsx-a11y/aria-activedescendant-has-tabindex": "warn",
37
+ "jsx-a11y/aria-props": "warn",
38
+ "jsx-a11y/aria-proptypes": "warn",
39
+ "jsx-a11y/aria-role": ["warn", { ignoreNonDOM: true }],
40
+ "jsx-a11y/aria-unsupported-elements": "warn",
41
+ "jsx-a11y/heading-has-content": "warn",
42
+ "jsx-a11y/iframe-has-title": "warn",
43
+ "jsx-a11y/img-redundant-alt": "warn",
44
+ "jsx-a11y/no-access-key": "warn",
45
+ "jsx-a11y/no-distracting-elements": "warn",
46
+ "jsx-a11y/no-redundant-roles": "warn",
47
+ "jsx-a11y/role-has-required-aria-props": "warn",
48
+ "jsx-a11y/role-supports-aria-props": "warn",
49
+ "jsx-a11y/scope": "warn",
50
+ "react/display-name": "warn",
51
+ "react-hooks/exhaustive-deps": "warn",
52
+ "react-hooks/rules-of-hooks": "error",
53
+ "react/jsx-curly-brace-presence": "warn",
54
+ "react/jsx-first-prop-new-line": ["warn", "multiline"],
55
+ "react/jsx-fragments": ["warn", "element"],
56
+ "react/jsx-key": "warn",
57
+ "react/jsx-max-props-per-line": ["warn", { maximum: { single: 3, multi: 1 } }],
58
+ "react/jsx-no-comment-textnodes": "warn",
59
+ "react/jsx-no-duplicate-props": "warn",
60
+ "react/jsx-no-target-blank": "warn",
61
+ "react/jsx-no-undef": "error",
62
+ "react/jsx-pascal-case": "warn",
63
+ "react/jsx-tag-spacing": ["warn", {
64
+ closingSlash: "never",
65
+ beforeSelfClosing: "always",
66
+ afterOpening: "never",
67
+ beforeClosing: "never"
68
+ }],
69
+ "react/jsx-uses-react": "warn",
70
+ "react/jsx-uses-vars": "warn",
71
+ "react/jsx-boolean-value": ["warn", "never"],
72
+ "react/jsx-closing-bracket-location": "warn",
73
+ "react/jsx-wrap-multilines": "warn",
74
+ "react/jsx-props-no-spread-multi": "warn",
75
+ "react/no-danger-with-children": "warn",
76
+ "react/no-direct-mutation-state": "warn",
77
+ "react/no-is-mounted": "warn",
78
+ "react/prop-types": "off",
79
+ "react/require-render-return": "error",
80
+ "react/style-prop-object": "warn"
81
+ }
82
+ }
83
+ ];
package/index.mjs ADDED
@@ -0,0 +1,260 @@
1
+ import babelParser from "@babel/eslint-parser";
2
+ import globals from "globals";
3
+ import js from "@eslint/js";
4
+ import stylisticJsPlugin from "@stylistic/eslint-plugin-js";
5
+
6
+
7
+ export default [
8
+ {
9
+ files: ["**/*.{js,mjs,cjs,jsx}"]
10
+ },
11
+ {
12
+ languageOptions: {
13
+ globals: {
14
+ ...globals.browser,
15
+ ...globals.commonjs,
16
+ ...globals.node,
17
+ ...globals.es2025
18
+ },
19
+ parser: babelParser,
20
+ parserOptions: {
21
+ requireConfigFile: false,
22
+ ecmaVersion: "latest",
23
+ babelOptions: {
24
+ babelrc: false,
25
+ configFile: false,
26
+ presets: ["@babel/preset-env"]
27
+ }
28
+ }
29
+ }
30
+ },
31
+ js.configs.recommended,
32
+ {
33
+ plugins: {
34
+ "@stylistic/js": stylisticJsPlugin
35
+ },
36
+ rules: {
37
+ "array-callback-return": "warn",
38
+ "arrow-body-style": "warn",
39
+ "camelcase": "warn",
40
+ "default-case": ["warn", { commentPattern: "^no default$" }],
41
+ "dot-notation": "warn",
42
+ "eqeqeq": ["warn", "smart"],
43
+ "getter-return": "warn",
44
+ "no-array-constructor": "warn",
45
+ "no-async-promise-executor": "off",
46
+ "no-caller": "warn",
47
+ "no-case-declarations": "off",
48
+ "no-cond-assign": ["warn", "except-parens"],
49
+ "no-const-assign": "warn",
50
+ "no-control-regex": "warn",
51
+ "no-delete-var": "warn",
52
+ "no-dupe-args": "warn",
53
+ "no-dupe-class-members": "warn",
54
+ "no-dupe-keys": "warn",
55
+ "no-duplicate-case": "warn",
56
+ "no-duplicate-imports": "warn",
57
+ "no-empty-character-class": "warn",
58
+ "no-empty-pattern": "warn",
59
+ "no-eval": "warn",
60
+ "no-ex-assign": "warn",
61
+ "no-extend-native": "warn",
62
+ "no-extra-bind": "warn",
63
+ "no-extra-label": "warn",
64
+ "no-extra-semi": "off",
65
+ "no-fallthrough": "warn",
66
+ "no-func-assign": "warn",
67
+ "no-global-assign": "warn",
68
+ "no-implied-eval": "warn",
69
+ "no-invalid-regexp": "warn",
70
+ "no-iterator": "warn",
71
+ "no-label-var": "warn",
72
+ "no-labels": ["warn", {
73
+ allowLoop: true,
74
+ allowSwitch: false
75
+ }],
76
+ "no-lone-blocks": "warn",
77
+ "no-loop-func": "warn",
78
+ "no-multi-str": "warn",
79
+ "no-new-func": "warn",
80
+ "no-new-object": "warn",
81
+ "no-new-symbol": "warn",
82
+ "no-new-wrappers": "warn",
83
+ "no-obj-calls": "warn",
84
+ "no-octal-escape": "warn",
85
+ "no-octal": "warn",
86
+ "no-redeclare": "warn",
87
+ "no-regex-spaces": "warn",
88
+ "no-restricted-globals": [
89
+ "error",
90
+ "addEventListener",
91
+ "blur",
92
+ "close",
93
+ "closed",
94
+ "confirm",
95
+ "event",
96
+ "external",
97
+ "focus",
98
+ "frameElement",
99
+ "frames",
100
+ "history",
101
+ "innerHeight",
102
+ "innerWidth",
103
+ "length",
104
+ "location",
105
+ "locationbar",
106
+ "menubar",
107
+ "moveBy",
108
+ "moveTo",
109
+ "name",
110
+ "onblur",
111
+ "onerror",
112
+ "onfocus",
113
+ "onload",
114
+ "onresize",
115
+ "onunload",
116
+ "open",
117
+ "opener",
118
+ "outerHeight",
119
+ "outerWidth",
120
+ "pageXOffset",
121
+ "pageYOffset",
122
+ "parent",
123
+ "print",
124
+ "removeEventListener",
125
+ "resizeBy",
126
+ "resizeTo",
127
+ "screen",
128
+ "screenLeft",
129
+ "screenTop",
130
+ "screenX",
131
+ "screenY",
132
+ "scroll",
133
+ "scrollbars",
134
+ "scrollBy",
135
+ "scrollTo",
136
+ "scrollX",
137
+ "scrollY",
138
+ "self",
139
+ "status",
140
+ "statusbar",
141
+ "stop",
142
+ "toolbar",
143
+ "top"
144
+ ],
145
+ "no-restricted-syntax": ["warn", "WithStatement"],
146
+ "no-script-url": "warn",
147
+ "no-self-assign": "warn",
148
+ "no-self-compare": "warn",
149
+ "no-sequences": "warn",
150
+ "no-shadow-restricted-names": "warn",
151
+ "no-sparse-arrays": "warn",
152
+ "no-template-curly-in-string": "warn",
153
+ "no-this-before-super": "warn",
154
+ "no-undef": "error",
155
+ "no-unreachable": "warn",
156
+ "no-unsafe-negation": "warn",
157
+ "no-unused-expressions": ["error", {
158
+ allowShortCircuit: true,
159
+ allowTernary: true,
160
+ allowTaggedTemplates: true
161
+ }],
162
+ "no-unused-labels": "warn",
163
+ "no-unused-vars": "warn",
164
+ "no-use-before-define": ["warn", {
165
+ functions: false,
166
+ classes: false,
167
+ variables: false
168
+ }],
169
+ "no-useless-escape": "warn",
170
+ "no-useless-computed-key": "warn",
171
+ "no-useless-concat": "warn",
172
+ "no-useless-constructor": "warn",
173
+ "no-useless-rename": "warn",
174
+ "no-var": "warn",
175
+ "no-with": "warn",
176
+ "object-shorthand": ["warn", "always"],
177
+ "prefer-arrow-callback": "warn",
178
+ "require-await": "warn",
179
+ "require-yield": "warn",
180
+ "strict": ["warn", "never"],
181
+ "unicode-bom": ["warn", "never"],
182
+ "use-isnan": "warn",
183
+ "valid-typeof": "warn",
184
+ "@stylistic/js/array-bracket-newline": ["warn", "consistent"],
185
+ "@stylistic/js/array-bracket-spacing": "warn",
186
+ "@stylistic/js/array-element-newline": ["warn", "consistent"],
187
+ "@stylistic/js/arrow-parens": "warn",
188
+ "@stylistic/js/arrow-spacing": "warn",
189
+ "@stylistic/js/block-spacing": "warn",
190
+ "@stylistic/js/brace-style": ["warn", "1tbs", {
191
+ allowSingleLine: true
192
+ }],
193
+ "@stylistic/js/comma-dangle": ["warn", "never"],
194
+ "@stylistic/js/comma-spacing": "warn",
195
+ "@stylistic/js/comma-style": "warn",
196
+ "@stylistic/js/computed-property-spacing": "warn",
197
+ "@stylistic/js/dot-location": ["warn", "property"],
198
+ "@stylistic/js/eol-last": ["warn", "never"],
199
+ "@stylistic/js/function-call-spacing": "warn",
200
+ "@stylistic/js/function-call-argument-newline": ["warn", "consistent"],
201
+ "@stylistic/js/function-paren-newline": ["warn", "consistent"],
202
+ "@stylistic/js/implicit-arrow-linebreak": "warn",
203
+ "@stylistic/js/indent": ["warn", "tab", {
204
+ SwitchCase: 1,
205
+ ignoreComments: true
206
+ }],
207
+ "@stylistic/js/key-spacing": "warn",
208
+ "@stylistic/js/keyword-spacing": "warn",
209
+ "@stylistic/js/new-parens": "warn",
210
+ "@stylistic/js/no-confusing-arrow": "warn",
211
+ "@stylistic/js/no-extra-semi": "warn",
212
+ "@stylistic/js/no-floating-decimal": "warn",
213
+ "@stylistic/js/no-mixed-operators": "warn",
214
+ "@stylistic/js/no-multi-spaces": "warn",
215
+ "@stylistic/js/no-multiple-empty-lines": ["warn", {
216
+ max: 2,
217
+ maxBOF: 0,
218
+ maxEOF: 0
219
+ }],
220
+ "@stylistic/js/no-trailing-spaces": "warn",
221
+ "@stylistic/js/no-whitespace-before-property": "warn",
222
+ "@stylistic/js/nonblock-statement-body-position": "warn",
223
+ "@stylistic/js/object-curly-newline": "warn",
224
+ "@stylistic/js/object-curly-spacing": ["warn", "always"],
225
+ "@stylistic/js/operator-linebreak": ["warn", "after", {
226
+ overrides: {
227
+ "?": "ignore",
228
+ ":": "ignore",
229
+ "||": "ignore",
230
+ "&&": "ignore"
231
+ }
232
+ }],
233
+ "@stylistic/js/padding-line-between-statements": [
234
+ "warn",
235
+ { blankLine: "always", prev: "default", next: "*" },
236
+ { blankLine: "always", prev: "*", next: "switch" }
237
+ ],
238
+ "@stylistic/js/quote-props": ["warn", "consistent-as-needed"],
239
+ "@stylistic/js/quotes": ["warn", "double"],
240
+ "@stylistic/js/rest-spread-spacing": "warn",
241
+ "@stylistic/js/semi": "warn",
242
+ "@stylistic/js/semi-spacing": "warn",
243
+ "@stylistic/js/semi-style": "warn",
244
+ "@stylistic/js/space-before-blocks": "warn",
245
+ "@stylistic/js/space-before-function-paren": ["warn", {
246
+ anonymous: "always",
247
+ named: "never",
248
+ asyncArrow: "always"
249
+ }],
250
+ "@stylistic/js/space-in-parens": "warn",
251
+ "@stylistic/js/space-infix-ops": "warn",
252
+ "@stylistic/js/space-unary-ops": "warn",
253
+ "@stylistic/js/spaced-comment": "warn",
254
+ "@stylistic/js/template-curly-spacing": "warn"
255
+ }
256
+ },
257
+ {
258
+ ignores: [".yarn/"]
259
+ }
260
+ ];
package/package.json CHANGED
@@ -1,36 +1,60 @@
1
1
  {
2
2
  "name": "eslint-config-arklint",
3
- "version": "1.11.0",
3
+ "version": "2.0.0",
4
4
  "author": "Arkellys",
5
5
  "license": "MIT",
6
- "main": "index.js",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "require": "./cjs/index.cjs",
10
+ "import": "./index.mjs"
11
+ },
12
+ "./extensions": {
13
+ "require": "./cjs/extensions/index.cjs",
14
+ "import": "./extensions/index.mjs"
15
+ }
16
+ },
17
+ "files": [
18
+ "cjs",
19
+ "extensions",
20
+ "index.mjs"
21
+ ],
7
22
  "repository": {
8
23
  "type": "git",
9
24
  "url": "git+https://github.com/Arkellys/eslint-config-arklint.git"
10
25
  },
11
26
  "homepage": "https://github.com/Arkellys/eslint-config-arklint#readme",
12
27
  "scripts": {
13
- "lint": "eslint ."
28
+ "lint": "eslint .",
29
+ "build:main": "babel index.mjs --out-dir cjs --out-file-extension .cjs",
30
+ "build:extensions": "babel extensions --out-dir cjs/extensions --out-file-extension .cjs",
31
+ "build": "rm -rf cjs && yarn build:main && yarn build:extensions",
32
+ "prepare": "husky"
14
33
  },
15
34
  "dependencies": {
16
- "@rushstack/eslint-patch": "^1.10.4",
17
- "@stylistic/eslint-plugin-js": "^2.6.2",
18
- "confusing-browser-globals": "^1.0.11",
19
- "eslint-plugin-import": "^2.29.1",
20
- "eslint-plugin-jsdoc": "^50.1.0",
21
- "eslint-plugin-jsx-a11y": "^6.9.0",
22
- "eslint-plugin-react": "^7.35.0",
35
+ "@babel/core": "^7.25.8",
36
+ "@babel/eslint-parser": "^7.25.8",
37
+ "@babel/preset-env": "^7.25.8",
38
+ "@babel/preset-react": "^7.25.7",
39
+ "@eslint/js": "^9.12.0",
40
+ "@stylistic/eslint-plugin-js": "^2.9.0",
41
+ "eslint-plugin-import": "^2.31.0",
42
+ "eslint-plugin-jsdoc": "^50.3.1",
43
+ "eslint-plugin-jsx-a11y": "^6.10.0",
44
+ "eslint-plugin-react": "^7.37.1",
23
45
  "eslint-plugin-react-hooks": "^4.6.2",
24
- "eslint-plugin-sort-imports-es6-autofix": "^0.6.0"
46
+ "eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
47
+ "globals": "^15.10.0"
25
48
  },
26
49
  "devDependencies": {
27
- "eslint": "^8.57.0"
50
+ "@babel/cli": "^7.25.7",
51
+ "babel-plugin-transform-esm-to-cjs": "^0.0.0",
52
+ "babel-plugin-transform-import-extension": "^1.0.3",
53
+ "eslint": "^8.57.1",
54
+ "husky": "^9.1.6"
28
55
  },
29
56
  "peerDependencies": {
30
57
  "eslint": ">=8.0.0"
31
58
  },
32
- "eslintConfig": {
33
- "extends": "./index.js"
34
- },
35
59
  "packageManager": "yarn@4.1.0"
36
60
  }
package/.editorconfig DELETED
@@ -1,10 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab
5
- indent_size = 3
6
- insert_final_newline = false
7
- trim_trailing_whitespace = true
8
-
9
- [*.md]
10
- trim_trailing_whitespace = false