@santi020k/eslint-config-santi020k 1.0.0 → 1.0.1
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/package.json +28 -17
- package/dist/cjs/index.cjs +0 -261
- package/dist/cjs/src/index.d.ts +0 -2
- package/dist/cjs/src/react-eslint.config.d.ts +0 -2
- package/dist/cjs/src/react-ts-eslint.condig.d.ts +0 -1
- package/dist/cjs/test/index.d.ts +0 -3
- package/dist/esm/index.mjs +0 -259
- package/dist/esm/src/index.d.ts +0 -2
- package/dist/esm/src/react-eslint.config.d.ts +0 -2
- package/dist/esm/src/react-ts-eslint.condig.d.ts +0 -1
- package/dist/esm/test/index.d.ts +0 -3
- package/dist/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@santi020k/eslint-config-santi020k",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A comprehensive ESLint configuration package for JavaScript, TypeScript, and React projects, including popular plugins and custom rules for consistent coding style.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.cjs",
|
|
@@ -19,15 +19,13 @@
|
|
|
19
19
|
"/dist"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
+
"dev": "rollup -c --watch",
|
|
22
23
|
"build": "rollup -c",
|
|
23
24
|
"lint": "eslint . --report-unused-disable-directives",
|
|
24
|
-
"lint:fix": "npm run lint -- --fix",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"release:generate:beta": "eslint-generate-prerelease beta",
|
|
29
|
-
"release:generate:rc": "eslint-generate-prerelease rc",
|
|
30
|
-
"release:publish": "eslint-publish-release",
|
|
25
|
+
"lint:fix": "npm run lint -- --fix --max-warnings=0",
|
|
26
|
+
"pre-commit": "lint-staged",
|
|
27
|
+
"pre-push": "npm run lint:fix && npm run build",
|
|
28
|
+
"prepare": "husky config/.husky",
|
|
31
29
|
"test": "not yet"
|
|
32
30
|
},
|
|
33
31
|
"repository": {
|
|
@@ -49,7 +47,7 @@
|
|
|
49
47
|
],
|
|
50
48
|
"license": "Apache License 2.0",
|
|
51
49
|
"peerDependencies": {
|
|
52
|
-
"eslint": "^9.
|
|
50
|
+
"eslint": "^9.4.0"
|
|
53
51
|
},
|
|
54
52
|
"publishConfig": {
|
|
55
53
|
"access": "public"
|
|
@@ -60,8 +58,11 @@
|
|
|
60
58
|
"devDependencies": {
|
|
61
59
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
62
60
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
63
|
-
"@types/node": "^20.
|
|
61
|
+
"@types/node": "^20.13.0",
|
|
62
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
64
63
|
"esbuild": "^0.21.4",
|
|
64
|
+
"husky": "^9.0.11",
|
|
65
|
+
"lint-staged": "^15.2.5",
|
|
65
66
|
"react": "^18.3.1",
|
|
66
67
|
"react-dom": "^18.3.1",
|
|
67
68
|
"rollup": "^4.18.0",
|
|
@@ -71,10 +72,12 @@
|
|
|
71
72
|
"typescript": "^5.4.5"
|
|
72
73
|
},
|
|
73
74
|
"dependencies": {
|
|
74
|
-
"@eslint/compat": "^1.0.
|
|
75
|
-
"@eslint/js": "^9.
|
|
75
|
+
"@eslint/compat": "^1.0.3",
|
|
76
|
+
"@eslint/js": "^9.4.0",
|
|
76
77
|
"@stylistic/eslint-plugin": "^2.1.0",
|
|
77
78
|
"@types/eslint__js": "^8.42.3",
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
80
|
+
"@typescript-eslint/type-utils": "^7.11.0",
|
|
78
81
|
"eslint-config-standard": "^17.1.0",
|
|
79
82
|
"eslint-plugin-import": "^2.29.1",
|
|
80
83
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
@@ -84,11 +87,9 @@
|
|
|
84
87
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
85
88
|
"eslint-plugin-simple-import-sort": "^12.1.0",
|
|
86
89
|
"eslint-plugin-sonarjs": "^1.0.3",
|
|
87
|
-
"eslint-plugin-unused-imports": "^
|
|
90
|
+
"eslint-plugin-unused-imports": "^4.0.0",
|
|
88
91
|
"globals": "^15.3.0",
|
|
89
|
-
"typescript-eslint": "^7.11.0"
|
|
90
|
-
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
91
|
-
"@typescript-eslint/type-utils": "^7.11.0"
|
|
92
|
+
"typescript-eslint": "^7.11.0"
|
|
92
93
|
},
|
|
93
94
|
"overrides": {
|
|
94
95
|
"eslint-config-standard": "$eslint-config-standard",
|
|
@@ -97,5 +98,15 @@
|
|
|
97
98
|
"@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin",
|
|
98
99
|
"@typescript-eslint/type-utils": "$@typescript-eslint/type-utils",
|
|
99
100
|
"eslint": "$eslint"
|
|
101
|
+
},
|
|
102
|
+
"lint-staged": {
|
|
103
|
+
"*.{js, jsx, ts, tsx, md}": [
|
|
104
|
+
"npm run lint:fix"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"config": {
|
|
108
|
+
"commitizen": {
|
|
109
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
110
|
+
}
|
|
100
111
|
}
|
|
101
|
-
}
|
|
112
|
+
}
|
package/dist/cjs/index.cjs
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var compat = require('@eslint/compat');
|
|
4
|
-
var eslint = require('@eslint/js');
|
|
5
|
-
var pluginStylistic = require('@stylistic/eslint-plugin');
|
|
6
|
-
var configStandard = require('eslint-config-standard');
|
|
7
|
-
var pluginImport = require('eslint-plugin-import');
|
|
8
|
-
var pluginJsxA11y = require('eslint-plugin-jsx-a11y');
|
|
9
|
-
var pluginN = require('eslint-plugin-n');
|
|
10
|
-
var pluginPromise = require('eslint-plugin-promise');
|
|
11
|
-
var pluginReactConfig = require('eslint-plugin-react/configs/recommended.js');
|
|
12
|
-
var pluginReactHooks = require('eslint-plugin-react-hooks');
|
|
13
|
-
var pluginSimpleImport = require('eslint-plugin-simple-import-sort');
|
|
14
|
-
var pluginSonarjs = require('eslint-plugin-sonarjs');
|
|
15
|
-
var pluginUnusedImport = require('eslint-plugin-unused-imports');
|
|
16
|
-
var globals = require('globals');
|
|
17
|
-
var tseslint = require('typescript-eslint');
|
|
18
|
-
|
|
19
|
-
const rules$1 = {
|
|
20
|
-
"react/react-in-jsx-scope": "off",
|
|
21
|
-
"react/jsx-max-depth": ["warn", { max: 7 }],
|
|
22
|
-
"react/prop-types": "off",
|
|
23
|
-
"unused-imports/no-unused-imports": "warn",
|
|
24
|
-
"react-hooks/exhaustive-deps": "off",
|
|
25
|
-
"@stylistic/indent": ["warn", 2],
|
|
26
|
-
"@stylistic/quote-props": ["warn", "as-needed"],
|
|
27
|
-
quotes: "off",
|
|
28
|
-
"@stylistic/quotes": ["warn", "single"],
|
|
29
|
-
"@stylistic/semi": ["warn", "never"],
|
|
30
|
-
"@stylistic/comma-dangle": ["warn", "never"],
|
|
31
|
-
"@stylistic/object-curly-spacing": ["warn", "always"],
|
|
32
|
-
"@stylistic/padded-blocks": ["warn", "never"],
|
|
33
|
-
"@stylistic/arrow-parens": ["warn", "as-needed"],
|
|
34
|
-
"@stylistic/dot-location": ["warn", "property"],
|
|
35
|
-
"@stylistic/function-call-argument-newline": ["warn", "never"],
|
|
36
|
-
"@stylistic/object-property-newline": [
|
|
37
|
-
"warn",
|
|
38
|
-
{ allowAllPropertiesOnSameLine: true }
|
|
39
|
-
],
|
|
40
|
-
"@stylistic/multiline-ternary": ["warn", "always-multiline"],
|
|
41
|
-
"@stylistic/member-delimiter-style": "off",
|
|
42
|
-
"@stylistic/no-extra-parens": "off",
|
|
43
|
-
"@stylistic/max-len": [
|
|
44
|
-
"warn",
|
|
45
|
-
{
|
|
46
|
-
code: 120,
|
|
47
|
-
tabWidth: 2,
|
|
48
|
-
comments: 200,
|
|
49
|
-
ignoreStrings: true
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"@stylistic/max-statements-per-line": ["warn", { max: 1 }],
|
|
53
|
-
"@stylistic/array-element-newline": ["warn", "consistent"],
|
|
54
|
-
"@stylistic/no-extra-semi": "off",
|
|
55
|
-
"@stylistic/no-multi-spaces": "off",
|
|
56
|
-
"@stylistic/padding-line-between-statements": [
|
|
57
|
-
"warn",
|
|
58
|
-
{ blankLine: "always", prev: "*", next: "*" },
|
|
59
|
-
{ blankLine: "any", prev: "import", next: "import" },
|
|
60
|
-
{
|
|
61
|
-
blankLine: "always",
|
|
62
|
-
prev: ["const", "let", "var"],
|
|
63
|
-
next: ["const", "let", "var"]
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
blankLine: "never",
|
|
67
|
-
prev: ["singleline-const", "singleline-let", "singleline-var"],
|
|
68
|
-
next: ["singleline-const", "singleline-let", "singleline-var"]
|
|
69
|
-
},
|
|
70
|
-
{ blankLine: "always", prev: "block-like", next: "const" },
|
|
71
|
-
{ blankLine: "always", prev: "const", next: "block-like" }
|
|
72
|
-
],
|
|
73
|
-
"@stylistic/function-paren-newline": ["warn", "consistent"],
|
|
74
|
-
"arrow-body-style": ["warn", "as-needed"],
|
|
75
|
-
"prefer-arrow-callback": ["warn", { allowNamedFunctions: true }],
|
|
76
|
-
"func-style": ["warn", "expression", { allowArrowFunctions: true }],
|
|
77
|
-
"simple-import-sort/imports": [
|
|
78
|
-
"warn",
|
|
79
|
-
{
|
|
80
|
-
groups: [
|
|
81
|
-
// Packages `react` related packages come first.
|
|
82
|
-
["^react"],
|
|
83
|
-
// Internal packages.
|
|
84
|
-
["^(store)(/.*|$)"],
|
|
85
|
-
["^(api)(/.*|$)"],
|
|
86
|
-
["^(components)(/.*|$)"],
|
|
87
|
-
["^(contexts)(/.*|$)"],
|
|
88
|
-
["^(hooks)(/.*|$)"],
|
|
89
|
-
["^(lib)(/.*|$)"],
|
|
90
|
-
["^(services)(/.*|$)"],
|
|
91
|
-
["^(models)(/.*|$)"],
|
|
92
|
-
["^(utils)(/.*|$)"],
|
|
93
|
-
["^(ws)(/.*|$)"],
|
|
94
|
-
// Side effect imports.
|
|
95
|
-
["^\\u0000"],
|
|
96
|
-
// Parent imports. Put `..` last.
|
|
97
|
-
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
|
|
98
|
-
// Other relative imports. Put same-folder imports and `.` last.
|
|
99
|
-
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
|
|
100
|
-
// Style imports.
|
|
101
|
-
["^.+\\.?(css)$"]
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
"react/button-has-type": "warn",
|
|
106
|
-
"react/display-name": "warn",
|
|
107
|
-
"react/no-children-prop": "warn",
|
|
108
|
-
"react/no-danger-with-children": "warn",
|
|
109
|
-
"react/no-unstable-nested-components": "warn",
|
|
110
|
-
"react/self-closing-comp": ["warn", { component: true, html: true }],
|
|
111
|
-
"react/jsx-curly-brace-presence": [
|
|
112
|
-
"warn",
|
|
113
|
-
{ props: "never", children: "never" }
|
|
114
|
-
],
|
|
115
|
-
"react/jsx-curly-newline": "warn",
|
|
116
|
-
"react/destructuring-assignment": "warn",
|
|
117
|
-
"react/jsx-pascal-case": "warn",
|
|
118
|
-
"react/boolean-prop-naming": "warn",
|
|
119
|
-
"react/hook-use-state": "warn",
|
|
120
|
-
"react/jsx-boolean-value": "warn",
|
|
121
|
-
"react/jsx-closing-tag-location": "warn",
|
|
122
|
-
"react/jsx-closing-bracket-location": "warn",
|
|
123
|
-
"react/jsx-wrap-multilines": "warn",
|
|
124
|
-
"react/jsx-no-target-blank": "warn",
|
|
125
|
-
"react/jsx-no-leaked-render": "warn",
|
|
126
|
-
"react/jsx-handler-names": "warn",
|
|
127
|
-
"react/jsx-fragments": "warn",
|
|
128
|
-
"react/no-deprecated": "warn",
|
|
129
|
-
"react/no-multi-comp": "warn",
|
|
130
|
-
"react/no-unescaped-entities": "warn",
|
|
131
|
-
"jsx-a11y/alt-text": "warn",
|
|
132
|
-
"no-empty": "warn",
|
|
133
|
-
"no-nested-ternary": "warn",
|
|
134
|
-
"no-undef": "warn",
|
|
135
|
-
"unused-imports/no-unused-vars": [
|
|
136
|
-
"warn",
|
|
137
|
-
{
|
|
138
|
-
vars: "all",
|
|
139
|
-
varsIgnorePattern: "^_",
|
|
140
|
-
args: "after-used",
|
|
141
|
-
argsIgnorePattern: "^_",
|
|
142
|
-
destructuredArrayIgnorePattern: "^_",
|
|
143
|
-
ignoreRestSiblings: true
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"no-void": "warn",
|
|
147
|
-
camelcase: "warn",
|
|
148
|
-
"react/jsx-no-undef": "warn",
|
|
149
|
-
"array-callback-return": "warn",
|
|
150
|
-
"no-fallthrough": "warn",
|
|
151
|
-
eqeqeq: "warn",
|
|
152
|
-
"no-constant-binary-expression": "warn",
|
|
153
|
-
"@stylistic/lines-around-comment": "warn",
|
|
154
|
-
"import/no-duplicates": "warn",
|
|
155
|
-
"valid-typeof": "warn",
|
|
156
|
-
"no-constant-condition": "warn",
|
|
157
|
-
"no-use-before-define": "warn",
|
|
158
|
-
"@stylistic/implicit-arrow-linebreak": "warn",
|
|
159
|
-
"import/export": "warn",
|
|
160
|
-
"no-useless-escape": "warn",
|
|
161
|
-
"@stylistic/brace-style": "warn",
|
|
162
|
-
"no-useless-return": "warn",
|
|
163
|
-
"prefer-promise-reject-errors": "warn",
|
|
164
|
-
"no-useless-constructor": "warn",
|
|
165
|
-
"no-new": "warn",
|
|
166
|
-
"prefer-regex-literals": "warn",
|
|
167
|
-
"react/no-unknown-property": "warn",
|
|
168
|
-
"@stylistic/multiline-comment-style": "off"
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const reactConfig = [
|
|
172
|
-
{
|
|
173
|
-
name: "eslint-config",
|
|
174
|
-
...eslint.configs.recommended
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
name: "plugins",
|
|
178
|
-
plugins: {
|
|
179
|
-
n: pluginN,
|
|
180
|
-
import: pluginImport,
|
|
181
|
-
promise: pluginPromise,
|
|
182
|
-
"simple-import-sort": pluginSimpleImport,
|
|
183
|
-
"jsx-a11y": pluginJsxA11y,
|
|
184
|
-
"unused-imports": pluginUnusedImport,
|
|
185
|
-
"react-rooks": pluginReactHooks,
|
|
186
|
-
sonarjs: pluginSonarjs
|
|
187
|
-
},
|
|
188
|
-
rules: {
|
|
189
|
-
...configStandard.rules,
|
|
190
|
-
...pluginSonarjs.configs.recommended.rules
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: "stylistic",
|
|
195
|
-
...pluginStylistic.configs["recommended-flat"]
|
|
196
|
-
// ...pluginStylistic.configs['all-flat']
|
|
197
|
-
},
|
|
198
|
-
...compat.fixupConfigRules(pluginReactConfig).map((react) => ({
|
|
199
|
-
...react,
|
|
200
|
-
name: "react"
|
|
201
|
-
})),
|
|
202
|
-
{
|
|
203
|
-
name: "custom",
|
|
204
|
-
languageOptions: {
|
|
205
|
-
ecmaVersion: "latest",
|
|
206
|
-
sourceType: "module",
|
|
207
|
-
...pluginReactConfig.languageOptions,
|
|
208
|
-
globals: {
|
|
209
|
-
...globals.browser
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
files: ["**/*.{js,jsx,mjs,cjs}"],
|
|
213
|
-
settings: {
|
|
214
|
-
react: {
|
|
215
|
-
version: "detect"
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
rules: rules$1
|
|
219
|
-
}
|
|
220
|
-
];
|
|
221
|
-
|
|
222
|
-
const rules = {
|
|
223
|
-
...rules$1,
|
|
224
|
-
"@typescript-eslint/indent": 0,
|
|
225
|
-
"@typescript-eslint/no-unused-vars": [
|
|
226
|
-
"warn",
|
|
227
|
-
{
|
|
228
|
-
vars: "all",
|
|
229
|
-
varsIgnorePattern: "^_",
|
|
230
|
-
args: "after-used",
|
|
231
|
-
argsIgnorePattern: "^_",
|
|
232
|
-
destructuredArrayIgnorePattern: "^_",
|
|
233
|
-
ignoreRestSiblings: true
|
|
234
|
-
}
|
|
235
|
-
],
|
|
236
|
-
"@typescript-eslint/no-explicit-any": "warn",
|
|
237
|
-
"@typescript-eslint/no-empty-function": "warn",
|
|
238
|
-
"@typescript-eslint/ban-types": "warn",
|
|
239
|
-
"@typescript-eslint/no-var-requires": "warn",
|
|
240
|
-
"@typescript-eslint/ban-ts-comment": "warn",
|
|
241
|
-
"@typescript-eslint/no-non-null-assertion": "warn",
|
|
242
|
-
"@typescript-eslint/no-invalid-void-type": "warn",
|
|
243
|
-
"@typescript-eslint/no-dynamic-delete": "warn",
|
|
244
|
-
"@typescript-eslint/no-useless-constructor": "warn",
|
|
245
|
-
"@typescript-eslint/prefer-for-of": "warn",
|
|
246
|
-
"@typescript-eslint/no-duplicate-enum-values": "warn"
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
const reactTsConfig = [
|
|
250
|
-
...reactConfig,
|
|
251
|
-
...tseslint.configs.strict,
|
|
252
|
-
...tseslint.configs.stylistic,
|
|
253
|
-
{
|
|
254
|
-
name: "ts-custom",
|
|
255
|
-
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
256
|
-
rules
|
|
257
|
-
}
|
|
258
|
-
];
|
|
259
|
-
|
|
260
|
-
exports.reactEslint = reactConfig;
|
|
261
|
-
exports.reactTsEslint = reactTsConfig;
|
package/dist/cjs/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/cjs/test/index.d.ts
DELETED
package/dist/esm/index.mjs
DELETED
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
// @ts-self-types="./index.d.ts"
|
|
2
|
-
import { fixupConfigRules } from '@eslint/compat';
|
|
3
|
-
import eslint from '@eslint/js';
|
|
4
|
-
import pluginStylistic from '@stylistic/eslint-plugin';
|
|
5
|
-
import configStandard from 'eslint-config-standard';
|
|
6
|
-
import pluginImport from 'eslint-plugin-import';
|
|
7
|
-
import pluginJsxA11y from 'eslint-plugin-jsx-a11y';
|
|
8
|
-
import pluginN from 'eslint-plugin-n';
|
|
9
|
-
import pluginPromise from 'eslint-plugin-promise';
|
|
10
|
-
import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js';
|
|
11
|
-
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
|
12
|
-
import pluginSimpleImport from 'eslint-plugin-simple-import-sort';
|
|
13
|
-
import pluginSonarjs from 'eslint-plugin-sonarjs';
|
|
14
|
-
import pluginUnusedImport from 'eslint-plugin-unused-imports';
|
|
15
|
-
import globals from 'globals';
|
|
16
|
-
import tseslint from 'typescript-eslint';
|
|
17
|
-
|
|
18
|
-
const rules$1 = {
|
|
19
|
-
"react/react-in-jsx-scope": "off",
|
|
20
|
-
"react/jsx-max-depth": ["warn", { max: 7 }],
|
|
21
|
-
"react/prop-types": "off",
|
|
22
|
-
"unused-imports/no-unused-imports": "warn",
|
|
23
|
-
"react-hooks/exhaustive-deps": "off",
|
|
24
|
-
"@stylistic/indent": ["warn", 2],
|
|
25
|
-
"@stylistic/quote-props": ["warn", "as-needed"],
|
|
26
|
-
quotes: "off",
|
|
27
|
-
"@stylistic/quotes": ["warn", "single"],
|
|
28
|
-
"@stylistic/semi": ["warn", "never"],
|
|
29
|
-
"@stylistic/comma-dangle": ["warn", "never"],
|
|
30
|
-
"@stylistic/object-curly-spacing": ["warn", "always"],
|
|
31
|
-
"@stylistic/padded-blocks": ["warn", "never"],
|
|
32
|
-
"@stylistic/arrow-parens": ["warn", "as-needed"],
|
|
33
|
-
"@stylistic/dot-location": ["warn", "property"],
|
|
34
|
-
"@stylistic/function-call-argument-newline": ["warn", "never"],
|
|
35
|
-
"@stylistic/object-property-newline": [
|
|
36
|
-
"warn",
|
|
37
|
-
{ allowAllPropertiesOnSameLine: true }
|
|
38
|
-
],
|
|
39
|
-
"@stylistic/multiline-ternary": ["warn", "always-multiline"],
|
|
40
|
-
"@stylistic/member-delimiter-style": "off",
|
|
41
|
-
"@stylistic/no-extra-parens": "off",
|
|
42
|
-
"@stylistic/max-len": [
|
|
43
|
-
"warn",
|
|
44
|
-
{
|
|
45
|
-
code: 120,
|
|
46
|
-
tabWidth: 2,
|
|
47
|
-
comments: 200,
|
|
48
|
-
ignoreStrings: true
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"@stylistic/max-statements-per-line": ["warn", { max: 1 }],
|
|
52
|
-
"@stylistic/array-element-newline": ["warn", "consistent"],
|
|
53
|
-
"@stylistic/no-extra-semi": "off",
|
|
54
|
-
"@stylistic/no-multi-spaces": "off",
|
|
55
|
-
"@stylistic/padding-line-between-statements": [
|
|
56
|
-
"warn",
|
|
57
|
-
{ blankLine: "always", prev: "*", next: "*" },
|
|
58
|
-
{ blankLine: "any", prev: "import", next: "import" },
|
|
59
|
-
{
|
|
60
|
-
blankLine: "always",
|
|
61
|
-
prev: ["const", "let", "var"],
|
|
62
|
-
next: ["const", "let", "var"]
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
blankLine: "never",
|
|
66
|
-
prev: ["singleline-const", "singleline-let", "singleline-var"],
|
|
67
|
-
next: ["singleline-const", "singleline-let", "singleline-var"]
|
|
68
|
-
},
|
|
69
|
-
{ blankLine: "always", prev: "block-like", next: "const" },
|
|
70
|
-
{ blankLine: "always", prev: "const", next: "block-like" }
|
|
71
|
-
],
|
|
72
|
-
"@stylistic/function-paren-newline": ["warn", "consistent"],
|
|
73
|
-
"arrow-body-style": ["warn", "as-needed"],
|
|
74
|
-
"prefer-arrow-callback": ["warn", { allowNamedFunctions: true }],
|
|
75
|
-
"func-style": ["warn", "expression", { allowArrowFunctions: true }],
|
|
76
|
-
"simple-import-sort/imports": [
|
|
77
|
-
"warn",
|
|
78
|
-
{
|
|
79
|
-
groups: [
|
|
80
|
-
// Packages `react` related packages come first.
|
|
81
|
-
["^react"],
|
|
82
|
-
// Internal packages.
|
|
83
|
-
["^(store)(/.*|$)"],
|
|
84
|
-
["^(api)(/.*|$)"],
|
|
85
|
-
["^(components)(/.*|$)"],
|
|
86
|
-
["^(contexts)(/.*|$)"],
|
|
87
|
-
["^(hooks)(/.*|$)"],
|
|
88
|
-
["^(lib)(/.*|$)"],
|
|
89
|
-
["^(services)(/.*|$)"],
|
|
90
|
-
["^(models)(/.*|$)"],
|
|
91
|
-
["^(utils)(/.*|$)"],
|
|
92
|
-
["^(ws)(/.*|$)"],
|
|
93
|
-
// Side effect imports.
|
|
94
|
-
["^\\u0000"],
|
|
95
|
-
// Parent imports. Put `..` last.
|
|
96
|
-
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
|
|
97
|
-
// Other relative imports. Put same-folder imports and `.` last.
|
|
98
|
-
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
|
|
99
|
-
// Style imports.
|
|
100
|
-
["^.+\\.?(css)$"]
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"react/button-has-type": "warn",
|
|
105
|
-
"react/display-name": "warn",
|
|
106
|
-
"react/no-children-prop": "warn",
|
|
107
|
-
"react/no-danger-with-children": "warn",
|
|
108
|
-
"react/no-unstable-nested-components": "warn",
|
|
109
|
-
"react/self-closing-comp": ["warn", { component: true, html: true }],
|
|
110
|
-
"react/jsx-curly-brace-presence": [
|
|
111
|
-
"warn",
|
|
112
|
-
{ props: "never", children: "never" }
|
|
113
|
-
],
|
|
114
|
-
"react/jsx-curly-newline": "warn",
|
|
115
|
-
"react/destructuring-assignment": "warn",
|
|
116
|
-
"react/jsx-pascal-case": "warn",
|
|
117
|
-
"react/boolean-prop-naming": "warn",
|
|
118
|
-
"react/hook-use-state": "warn",
|
|
119
|
-
"react/jsx-boolean-value": "warn",
|
|
120
|
-
"react/jsx-closing-tag-location": "warn",
|
|
121
|
-
"react/jsx-closing-bracket-location": "warn",
|
|
122
|
-
"react/jsx-wrap-multilines": "warn",
|
|
123
|
-
"react/jsx-no-target-blank": "warn",
|
|
124
|
-
"react/jsx-no-leaked-render": "warn",
|
|
125
|
-
"react/jsx-handler-names": "warn",
|
|
126
|
-
"react/jsx-fragments": "warn",
|
|
127
|
-
"react/no-deprecated": "warn",
|
|
128
|
-
"react/no-multi-comp": "warn",
|
|
129
|
-
"react/no-unescaped-entities": "warn",
|
|
130
|
-
"jsx-a11y/alt-text": "warn",
|
|
131
|
-
"no-empty": "warn",
|
|
132
|
-
"no-nested-ternary": "warn",
|
|
133
|
-
"no-undef": "warn",
|
|
134
|
-
"unused-imports/no-unused-vars": [
|
|
135
|
-
"warn",
|
|
136
|
-
{
|
|
137
|
-
vars: "all",
|
|
138
|
-
varsIgnorePattern: "^_",
|
|
139
|
-
args: "after-used",
|
|
140
|
-
argsIgnorePattern: "^_",
|
|
141
|
-
destructuredArrayIgnorePattern: "^_",
|
|
142
|
-
ignoreRestSiblings: true
|
|
143
|
-
}
|
|
144
|
-
],
|
|
145
|
-
"no-void": "warn",
|
|
146
|
-
camelcase: "warn",
|
|
147
|
-
"react/jsx-no-undef": "warn",
|
|
148
|
-
"array-callback-return": "warn",
|
|
149
|
-
"no-fallthrough": "warn",
|
|
150
|
-
eqeqeq: "warn",
|
|
151
|
-
"no-constant-binary-expression": "warn",
|
|
152
|
-
"@stylistic/lines-around-comment": "warn",
|
|
153
|
-
"import/no-duplicates": "warn",
|
|
154
|
-
"valid-typeof": "warn",
|
|
155
|
-
"no-constant-condition": "warn",
|
|
156
|
-
"no-use-before-define": "warn",
|
|
157
|
-
"@stylistic/implicit-arrow-linebreak": "warn",
|
|
158
|
-
"import/export": "warn",
|
|
159
|
-
"no-useless-escape": "warn",
|
|
160
|
-
"@stylistic/brace-style": "warn",
|
|
161
|
-
"no-useless-return": "warn",
|
|
162
|
-
"prefer-promise-reject-errors": "warn",
|
|
163
|
-
"no-useless-constructor": "warn",
|
|
164
|
-
"no-new": "warn",
|
|
165
|
-
"prefer-regex-literals": "warn",
|
|
166
|
-
"react/no-unknown-property": "warn",
|
|
167
|
-
"@stylistic/multiline-comment-style": "off"
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
const reactConfig = [
|
|
171
|
-
{
|
|
172
|
-
name: "eslint-config",
|
|
173
|
-
...eslint.configs.recommended
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
name: "plugins",
|
|
177
|
-
plugins: {
|
|
178
|
-
n: pluginN,
|
|
179
|
-
import: pluginImport,
|
|
180
|
-
promise: pluginPromise,
|
|
181
|
-
"simple-import-sort": pluginSimpleImport,
|
|
182
|
-
"jsx-a11y": pluginJsxA11y,
|
|
183
|
-
"unused-imports": pluginUnusedImport,
|
|
184
|
-
"react-rooks": pluginReactHooks,
|
|
185
|
-
sonarjs: pluginSonarjs
|
|
186
|
-
},
|
|
187
|
-
rules: {
|
|
188
|
-
...configStandard.rules,
|
|
189
|
-
...pluginSonarjs.configs.recommended.rules
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
name: "stylistic",
|
|
194
|
-
...pluginStylistic.configs["recommended-flat"]
|
|
195
|
-
// ...pluginStylistic.configs['all-flat']
|
|
196
|
-
},
|
|
197
|
-
...fixupConfigRules(pluginReactConfig).map((react) => ({
|
|
198
|
-
...react,
|
|
199
|
-
name: "react"
|
|
200
|
-
})),
|
|
201
|
-
{
|
|
202
|
-
name: "custom",
|
|
203
|
-
languageOptions: {
|
|
204
|
-
ecmaVersion: "latest",
|
|
205
|
-
sourceType: "module",
|
|
206
|
-
...pluginReactConfig.languageOptions,
|
|
207
|
-
globals: {
|
|
208
|
-
...globals.browser
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
files: ["**/*.{js,jsx,mjs,cjs}"],
|
|
212
|
-
settings: {
|
|
213
|
-
react: {
|
|
214
|
-
version: "detect"
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
rules: rules$1
|
|
218
|
-
}
|
|
219
|
-
];
|
|
220
|
-
|
|
221
|
-
const rules = {
|
|
222
|
-
...rules$1,
|
|
223
|
-
"@typescript-eslint/indent": 0,
|
|
224
|
-
"@typescript-eslint/no-unused-vars": [
|
|
225
|
-
"warn",
|
|
226
|
-
{
|
|
227
|
-
vars: "all",
|
|
228
|
-
varsIgnorePattern: "^_",
|
|
229
|
-
args: "after-used",
|
|
230
|
-
argsIgnorePattern: "^_",
|
|
231
|
-
destructuredArrayIgnorePattern: "^_",
|
|
232
|
-
ignoreRestSiblings: true
|
|
233
|
-
}
|
|
234
|
-
],
|
|
235
|
-
"@typescript-eslint/no-explicit-any": "warn",
|
|
236
|
-
"@typescript-eslint/no-empty-function": "warn",
|
|
237
|
-
"@typescript-eslint/ban-types": "warn",
|
|
238
|
-
"@typescript-eslint/no-var-requires": "warn",
|
|
239
|
-
"@typescript-eslint/ban-ts-comment": "warn",
|
|
240
|
-
"@typescript-eslint/no-non-null-assertion": "warn",
|
|
241
|
-
"@typescript-eslint/no-invalid-void-type": "warn",
|
|
242
|
-
"@typescript-eslint/no-dynamic-delete": "warn",
|
|
243
|
-
"@typescript-eslint/no-useless-constructor": "warn",
|
|
244
|
-
"@typescript-eslint/prefer-for-of": "warn",
|
|
245
|
-
"@typescript-eslint/no-duplicate-enum-values": "warn"
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
const reactTsConfig = [
|
|
249
|
-
...reactConfig,
|
|
250
|
-
...tseslint.configs.strict,
|
|
251
|
-
...tseslint.configs.stylistic,
|
|
252
|
-
{
|
|
253
|
-
name: "ts-custom",
|
|
254
|
-
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
255
|
-
rules
|
|
256
|
-
}
|
|
257
|
-
];
|
|
258
|
-
|
|
259
|
-
export { reactConfig as reactEslint, reactTsConfig as reactTsEslint };
|
package/dist/esm/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/esm/test/index.d.ts
DELETED
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __esModule: boolean;
|