@siberiacancode/eslint 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +19 -19
- package/index.js +20 -24
- package/package.json +11 -12
package/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
declare module '@siberiacancode/eslint' {
|
|
2
|
-
declare type Eslint = (
|
|
3
|
-
options?: import('@antfu/eslint-config').OptionsConfig & {
|
|
4
|
-
jsxA11y?: boolean;
|
|
5
|
-
next?: boolean;
|
|
6
|
-
} & import('@antfu/eslint-config').TypedFlatConfigItem,
|
|
7
|
-
...userConfigs: import('@antfu/eslint-config').Awaitable<
|
|
8
|
-
| import('@antfu/eslint-config').TypedFlatConfigItem
|
|
9
|
-
| import('@antfu/eslint-config').TypedFlatConfigItem[]
|
|
10
|
-
| import('@antfu/eslint-config').FlatConfigComposer<any, any>
|
|
11
|
-
| Linter.Config[]
|
|
12
|
-
>[]
|
|
13
|
-
) => import('@antfu/eslint-config').FlatConfigComposer<
|
|
14
|
-
import('@antfu/eslint-config').TypedFlatConfigItem,
|
|
15
|
-
import('@antfu/eslint-config').ConfigNames
|
|
16
|
-
>;
|
|
17
|
-
|
|
18
|
-
export const eslint: Eslint;
|
|
19
|
-
}
|
|
1
|
+
declare module '@siberiacancode/eslint' {
|
|
2
|
+
declare type Eslint = (
|
|
3
|
+
options?: import('@antfu/eslint-config').OptionsConfig & {
|
|
4
|
+
jsxA11y?: boolean;
|
|
5
|
+
next?: boolean;
|
|
6
|
+
} & import('@antfu/eslint-config').TypedFlatConfigItem,
|
|
7
|
+
...userConfigs: import('@antfu/eslint-config').Awaitable<
|
|
8
|
+
| import('@antfu/eslint-config').TypedFlatConfigItem
|
|
9
|
+
| import('@antfu/eslint-config').TypedFlatConfigItem[]
|
|
10
|
+
| import('@antfu/eslint-config').FlatConfigComposer<any, any>
|
|
11
|
+
| Linter.Config[]
|
|
12
|
+
>[]
|
|
13
|
+
) => import('@antfu/eslint-config').FlatConfigComposer<
|
|
14
|
+
import('@antfu/eslint-config').TypedFlatConfigItem,
|
|
15
|
+
import('@antfu/eslint-config').ConfigNames
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export const eslint: Eslint;
|
|
19
|
+
}
|
package/index.js
CHANGED
|
@@ -2,11 +2,10 @@ import antfu from '@antfu/eslint-config';
|
|
|
2
2
|
import pluginNext from '@next/eslint-plugin-next';
|
|
3
3
|
import pluginJsxA11y from 'eslint-plugin-jsx-a11y';
|
|
4
4
|
import pluginReact from 'eslint-plugin-react';
|
|
5
|
-
import pluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
6
5
|
|
|
7
6
|
/** @type {import('@siberiacancode/eslint').Eslint} */
|
|
8
7
|
export const eslint = ({ jsxA11y = false, next = false, ...options }, ...configs) => {
|
|
9
|
-
const stylistic = options
|
|
8
|
+
const stylistic = options?.stylistic ?? false;
|
|
10
9
|
|
|
11
10
|
if (next) {
|
|
12
11
|
configs.unshift({
|
|
@@ -60,6 +59,7 @@ export const eslint = ({ jsxA11y = false, next = false, ...options }, ...configs
|
|
|
60
59
|
acc[key.replace('react', 'siberiacancode-react')] = value;
|
|
61
60
|
return acc;
|
|
62
61
|
}, {}),
|
|
62
|
+
'siberiacancode-react/prop-types': 'off',
|
|
63
63
|
'siberiacancode-react/react-in-jsx-scope': 'off',
|
|
64
64
|
'siberiacancode-react/function-component-definition': [
|
|
65
65
|
'error',
|
|
@@ -115,31 +115,27 @@ export const eslint = ({ jsxA11y = false, next = false, ...options }, ...configs
|
|
|
115
115
|
|
|
116
116
|
'test/prefer-lowercase-title': 'off',
|
|
117
117
|
|
|
118
|
-
'no-console': 'warn'
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
{
|
|
122
|
-
name: 'siberiacancode/imports',
|
|
123
|
-
plugins: {
|
|
124
|
-
'plugin-simple-import-sort': pluginSimpleImportSort
|
|
125
|
-
},
|
|
126
|
-
rules: {
|
|
127
|
-
'sort-imports': 'off',
|
|
128
|
-
'import/order': 'off',
|
|
129
|
-
'import/extensions': 'off',
|
|
130
|
-
'plugin-simple-import-sort/exports': 'error',
|
|
131
|
-
'plugin-simple-import-sort/imports': [
|
|
118
|
+
'no-console': 'warn',
|
|
119
|
+
|
|
120
|
+
'perfectionist/sort-imports': [
|
|
132
121
|
'error',
|
|
133
122
|
{
|
|
134
123
|
groups: [
|
|
135
|
-
|
|
136
|
-
['
|
|
137
|
-
|
|
138
|
-
['
|
|
139
|
-
['
|
|
140
|
-
['
|
|
141
|
-
|
|
142
|
-
|
|
124
|
+
'type',
|
|
125
|
+
['builtin', 'external'],
|
|
126
|
+
'internal-type',
|
|
127
|
+
['internal'],
|
|
128
|
+
['parent-type', 'sibling-type', 'index-type'],
|
|
129
|
+
['parent', 'sibling', 'index'],
|
|
130
|
+
'object',
|
|
131
|
+
'style',
|
|
132
|
+
'side-effect-style',
|
|
133
|
+
'unknown'
|
|
134
|
+
],
|
|
135
|
+
internalPattern: ['~/**', '@/**'],
|
|
136
|
+
newlinesBetween: 'ignore',
|
|
137
|
+
order: 'asc',
|
|
138
|
+
type: 'natural'
|
|
143
139
|
}
|
|
144
140
|
]
|
|
145
141
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siberiacancode/eslint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"description": "eslint configs",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "SIBERIA CAN CODE 🧊",
|
|
@@ -35,19 +35,18 @@
|
|
|
35
35
|
"lint-inspector": "npx @eslint/config-inspector"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"eslint": "^9.
|
|
38
|
+
"eslint": "^9.15.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@antfu/eslint-config": "^
|
|
42
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
43
|
-
"@next/eslint-plugin-next": "^
|
|
44
|
-
"@vue/compiler-sfc": "^3.
|
|
45
|
-
"eslint": "^9.
|
|
46
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
47
|
-
"eslint-plugin-react": "^7.
|
|
48
|
-
"eslint-plugin-react-hooks": "^
|
|
49
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
50
|
-
"eslint-plugin-simple-import-sort": "^12.1.1"
|
|
41
|
+
"@antfu/eslint-config": "^3.9.1",
|
|
42
|
+
"@eslint-react/eslint-plugin": "^1.16.1",
|
|
43
|
+
"@next/eslint-plugin-next": "^15.0.3",
|
|
44
|
+
"@vue/compiler-sfc": "^3.5.13",
|
|
45
|
+
"eslint": "^9.15.0",
|
|
46
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
47
|
+
"eslint-plugin-react": "^7.37.2",
|
|
48
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
49
|
+
"eslint-plugin-react-refresh": "^0.4.14"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@siberiacancode/prettier": "*"
|