@dg-scripts/eslint-config 0.0.0-1867 → 0.0.0-2288
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/README.md +157 -0
- package/index.d.ts +88 -0
- package/index.js +167 -38
- package/package.json +29 -17
- package/CHANGELOG.md +0 -198
package/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# @dg-scripts/eslint-config
|
|
2
|
+
|
|
3
|
+
[](https://github.com/sabertazimi)
|
|
4
|
+
[](https://raw.githubusercontent.com/sabertazimi/bod/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/@dg-scripts/eslint-config)
|
|
7
|
+
[](https://www.npmjs.com/package/@dg-scripts/eslint-config)
|
|
8
|
+
[](https://cdn.jsdelivr.net/npm/@dg-scripts/eslint-config@latest/)
|
|
9
|
+
|
|
10
|
+
[](https://github.com/sabertazimi/bod/actions/workflows/ci.yml)
|
|
11
|
+
[](https://codecov.io/gh/sabertazimi/bod)
|
|
12
|
+
|
|
13
|
+
This package includes the shareable ESLint configuration used by [Bod CLI](https://github.com/sabertazimi/bod).
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -D @dg-scripts/eslint-config
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
### Basic Usage
|
|
24
|
+
|
|
25
|
+
Create a file named `eslint.config.ts`
|
|
26
|
+
with following contents in the root folder of your project:
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
export { default } from '@dg-scripts/eslint-config'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### With Custom Options
|
|
33
|
+
|
|
34
|
+
Use `defineConfig` to customize the configuration:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
import { defineConfig } from '@dg-scripts/eslint-config'
|
|
38
|
+
|
|
39
|
+
export default defineConfig({
|
|
40
|
+
// Customize TypeScript options
|
|
41
|
+
typescript: {
|
|
42
|
+
tsconfigPath: './path/to/tsconfig.json', // Custom tsconfig path
|
|
43
|
+
},
|
|
44
|
+
// Disable some opinionated rules
|
|
45
|
+
lessOpinionated: true,
|
|
46
|
+
// Other options from @antfu/eslint-config
|
|
47
|
+
})
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### With Additional Rules
|
|
51
|
+
|
|
52
|
+
You can override or add rules by using `defineConfig` with additional configs (recommended):
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
import { defineConfig } from '@dg-scripts/eslint-config'
|
|
56
|
+
|
|
57
|
+
export default defineConfig(
|
|
58
|
+
{
|
|
59
|
+
typescript: {
|
|
60
|
+
tsconfigPath: 'tsconfig.json',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'cypress',
|
|
65
|
+
ignores: ['cypress', 'cypress.config.ts'],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'react',
|
|
69
|
+
rules: {
|
|
70
|
+
'react-refresh/only-export-components': 'off',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
import { defineConfig } from '@dg-scripts/eslint-config'
|
|
78
|
+
|
|
79
|
+
export default defineConfig(
|
|
80
|
+
{
|
|
81
|
+
name: 'base',
|
|
82
|
+
rules: {
|
|
83
|
+
'node/prefer-global/process': 'off',
|
|
84
|
+
'react-refresh/only-export-components': 'off',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'ui',
|
|
89
|
+
files: ['src/components/ui/*.tsx'],
|
|
90
|
+
rules: {
|
|
91
|
+
'react/no-children-map': 'off',
|
|
92
|
+
'react/no-clone-element': 'off',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Or by chaining methods (not recommended):
|
|
99
|
+
|
|
100
|
+
```js
|
|
101
|
+
import eslintConfig from '@dg-scripts/eslint-config'
|
|
102
|
+
|
|
103
|
+
export default eslintConfig
|
|
104
|
+
.append({
|
|
105
|
+
name: 'cypress',
|
|
106
|
+
ignores: ['cypress', 'cypress.config.ts'],
|
|
107
|
+
})
|
|
108
|
+
.append({
|
|
109
|
+
name: 'react',
|
|
110
|
+
rules: {
|
|
111
|
+
'react-refresh/only-export-components': 'off',
|
|
112
|
+
},
|
|
113
|
+
})
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Type-Aware Rules
|
|
117
|
+
|
|
118
|
+
By default, type-aware [rules](https://typescript-eslint.io/getting-started/typed-linting) are **enabled** with `tsconfigPath: 'tsconfig.json'`.
|
|
119
|
+
|
|
120
|
+
The configuration will automatically look for `tsconfig.json` in your project root.
|
|
121
|
+
If your `tsconfig.json` is in a different location, you can customize it:
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
import { defineConfig } from '@dg-scripts/eslint-config'
|
|
125
|
+
|
|
126
|
+
export default defineConfig({
|
|
127
|
+
typescript: {
|
|
128
|
+
tsconfigPath: './path/to/tsconfig.json',
|
|
129
|
+
},
|
|
130
|
+
})
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
To disable type-aware rules:
|
|
134
|
+
|
|
135
|
+
```js
|
|
136
|
+
import { defineConfig } from '@dg-scripts/eslint-config'
|
|
137
|
+
|
|
138
|
+
export default defineConfig({
|
|
139
|
+
typescript: true, // Enable TypeScript support without type-aware rules
|
|
140
|
+
})
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Next.js
|
|
144
|
+
|
|
145
|
+
When package `next` and `@next/eslint-plugin-next` are installed in your project,
|
|
146
|
+
the Next.js configuration will be enabled automatically.
|
|
147
|
+
No additional configuration is required.
|
|
148
|
+
|
|
149
|
+
## Rules
|
|
150
|
+
|
|
151
|
+
See [ESLint inspector report](https://tazimi.dev/bod/eslint) for more details.
|
|
152
|
+
|
|
153
|
+
## Contact
|
|
154
|
+
|
|
155
|
+
[](https://github.com/sabertazimi)
|
|
156
|
+
[](mailto:sabertazimi@gmail.com)
|
|
157
|
+
[](https://x.com/sabertazimi)
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type antfu from '@antfu/eslint-config'
|
|
2
|
+
import type { OptionsConfig, TypedFlatConfigItem } from '@antfu/eslint-config'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Define ESLint config with default settings.
|
|
6
|
+
*
|
|
7
|
+
* Default configuration includes:
|
|
8
|
+
* - TypeScript support with type-aware rules (tsconfigPath: 'tsconfig.json')
|
|
9
|
+
* - React support
|
|
10
|
+
* - Stylistic formatting rules
|
|
11
|
+
* - Next.js support (auto-detected)
|
|
12
|
+
* - CSS, HTML, and Markdown formatters
|
|
13
|
+
*
|
|
14
|
+
* @param options - ESLint configuration options
|
|
15
|
+
* @param userConfigs - Additional user-defined flat config items
|
|
16
|
+
* @returns ESLint flat config composer
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* Use default configuration (type-aware rules enabled)
|
|
20
|
+
* ```js
|
|
21
|
+
* export { default } from '@dg-scripts/eslint-config'
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* Customize TypeScript options
|
|
26
|
+
* ```js
|
|
27
|
+
* import { defineConfig } from '@dg-scripts/eslint-config'
|
|
28
|
+
*
|
|
29
|
+
* export default defineConfig({
|
|
30
|
+
* typescript: {
|
|
31
|
+
* tsconfigPath: './path/to/tsconfig.json',
|
|
32
|
+
* },
|
|
33
|
+
* })
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* Disable type-aware rules
|
|
38
|
+
* ```js
|
|
39
|
+
* import { defineConfig } from '@dg-scripts/eslint-config'
|
|
40
|
+
*
|
|
41
|
+
* export default defineConfig({
|
|
42
|
+
* typescript: true,
|
|
43
|
+
* })
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* Customize ESLint config
|
|
48
|
+
* ```js
|
|
49
|
+
* import { defineConfig } from '@dg-scripts/eslint-config'
|
|
50
|
+
*
|
|
51
|
+
* export default defineConfig(
|
|
52
|
+
* {
|
|
53
|
+
* name: 'base',
|
|
54
|
+
* rules: {
|
|
55
|
+
* 'node/prefer-global/process': 'off',
|
|
56
|
+
* 'react-refresh/only-export-components': 'off',
|
|
57
|
+
* },
|
|
58
|
+
* },
|
|
59
|
+
* {
|
|
60
|
+
* name: 'ui',
|
|
61
|
+
* files: ['src/components/ui/*.tsx'],
|
|
62
|
+
* rules: {
|
|
63
|
+
* 'react/no-children-map': 'off',
|
|
64
|
+
* 'react/no-clone-element': 'off',
|
|
65
|
+
* },
|
|
66
|
+
* },
|
|
67
|
+
* )
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export function defineConfig(
|
|
71
|
+
options?: OptionsConfig & TypedFlatConfigItem,
|
|
72
|
+
...userConfigs: TypedFlatConfigItem[]
|
|
73
|
+
): ReturnType<typeof antfu>
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Default ESLint config with type-aware rules enabled.
|
|
77
|
+
*
|
|
78
|
+
* This is equivalent to calling `defineConfig()` without any arguments.
|
|
79
|
+
* Type-aware rules are enabled by default with `tsconfigPath: 'tsconfig.json'`.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```js
|
|
83
|
+
* export { default } from '@dg-scripts/eslint-config'
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
declare const defaultConfig: ReturnType<typeof antfu>
|
|
87
|
+
|
|
88
|
+
export default defaultConfig
|
package/index.js
CHANGED
|
@@ -1,40 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
// @ts-check
|
|
2
|
+
import antfu, { GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_TESTS } from '@antfu/eslint-config'
|
|
3
|
+
import eslintPluginTestingLibrary from 'eslint-plugin-testing-library'
|
|
3
4
|
import { isPackageExists } from 'local-pkg'
|
|
4
|
-
import antfu from '@antfu/eslint-config'
|
|
5
|
-
import { FlatCompat } from '@eslint/eslintrc'
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
/** @type {import('@antfu/eslint-config').TypedFlatConfigItem} */
|
|
7
|
+
const eslintConfigMarkdown = {
|
|
8
|
+
name: '@dg-scripts/markdown/rules',
|
|
9
|
+
files: [GLOB_MARKDOWN_CODE, `${GLOB_MARKDOWN}/**/*.vue`],
|
|
10
|
+
languageOptions: { parserOptions: { project: false, program: null } },
|
|
11
|
+
rules: {
|
|
12
|
+
'react/no-leaked-conditional-rendering': 'off',
|
|
13
|
+
},
|
|
14
|
+
}
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
/** @type {import('@antfu/eslint-config').TypedFlatConfigItem} */
|
|
17
|
+
const eslintConfigTestingLibrary = {
|
|
18
|
+
name: '@dg-scripts/testing-library/rules',
|
|
19
|
+
files: [...GLOB_TESTS],
|
|
20
|
+
plugins: {
|
|
21
|
+
'testing-library': eslintPluginTestingLibrary,
|
|
22
|
+
},
|
|
23
|
+
rules: {
|
|
24
|
+
'test/no-interpolation-in-snapshots': 'error',
|
|
25
|
+
'test/no-mocks-import': 'error',
|
|
26
|
+
'test/prefer-lowercase-title': [
|
|
27
|
+
'error',
|
|
17
28
|
{
|
|
18
|
-
|
|
19
|
-
extends: 'next/core-web-vitals',
|
|
29
|
+
ignoreTopLevelDescribe: true,
|
|
20
30
|
},
|
|
21
31
|
],
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
'test/valid-describe-callback': 'error',
|
|
33
|
+
'test/valid-expect': 'error',
|
|
34
|
+
'test/valid-title': 'warn',
|
|
35
|
+
'testing-library/await-async-events': [
|
|
36
|
+
'error',
|
|
37
|
+
{ eventModule: 'userEvent' },
|
|
38
|
+
],
|
|
39
|
+
'testing-library/await-async-queries': 'error',
|
|
40
|
+
'testing-library/await-async-utils': 'error',
|
|
41
|
+
'testing-library/no-await-sync-events': [
|
|
42
|
+
'error',
|
|
43
|
+
{ eventModules: ['fire-event'] },
|
|
44
|
+
],
|
|
45
|
+
'testing-library/no-await-sync-queries': 'error',
|
|
46
|
+
'testing-library/no-container': 'error',
|
|
47
|
+
'testing-library/no-debugging-utils': 'warn',
|
|
48
|
+
'testing-library/no-dom-import': 'error',
|
|
49
|
+
'testing-library/no-global-regexp-flag-in-query': 'error',
|
|
50
|
+
'testing-library/no-node-access': 'error',
|
|
51
|
+
'testing-library/no-promise-in-fire-event': 'error',
|
|
52
|
+
'testing-library/no-render-in-lifecycle': 'error',
|
|
53
|
+
'testing-library/no-unnecessary-act': 'error',
|
|
54
|
+
'testing-library/no-wait-for-multiple-assertions': 'error',
|
|
55
|
+
'testing-library/no-wait-for-side-effects': 'error',
|
|
56
|
+
'testing-library/no-wait-for-snapshot': 'error',
|
|
57
|
+
'testing-library/prefer-find-by': 'error',
|
|
58
|
+
'testing-library/prefer-presence-queries': 'error',
|
|
59
|
+
'testing-library/prefer-query-by-disappearance': 'error',
|
|
60
|
+
'testing-library/prefer-screen-queries': 'error',
|
|
61
|
+
'testing-library/render-result-naming-convention': 'error',
|
|
32
62
|
},
|
|
33
63
|
}
|
|
34
64
|
|
|
35
65
|
/** @type {import('@antfu/eslint-config').TypedFlatConfigItem} */
|
|
36
66
|
const eslintConfigRules = {
|
|
67
|
+
name: '@dg-scripts/defaults/rules',
|
|
37
68
|
rules: {
|
|
69
|
+
'eslint-comments/require-description': 'error',
|
|
70
|
+
'pnpm/json-enforce-catalog': 'off',
|
|
38
71
|
'style/brace-style': ['error', '1tbs'],
|
|
39
72
|
'ts/prefer-literal-enum-member': [
|
|
40
73
|
'error',
|
|
@@ -47,21 +80,117 @@ const eslintConfigRules = {
|
|
|
47
80
|
|
|
48
81
|
/** @type {import('@antfu/eslint-config').TypedFlatConfigItem[]} */
|
|
49
82
|
const eslintConfig = [
|
|
50
|
-
|
|
83
|
+
eslintConfigMarkdown,
|
|
84
|
+
eslintConfigTestingLibrary,
|
|
51
85
|
eslintConfigRules,
|
|
52
86
|
]
|
|
53
87
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
88
|
+
const eslintConfigNext
|
|
89
|
+
= isPackageExists('next') && isPackageExists('@next/eslint-plugin-next')
|
|
90
|
+
? { nextjs: true }
|
|
91
|
+
: { nextjs: false }
|
|
92
|
+
|
|
93
|
+
/** @type {import('@antfu/eslint-config').OptionsConfig} */
|
|
94
|
+
const eslintConfigAntfu = {
|
|
95
|
+
react: true,
|
|
96
|
+
stylistic: true,
|
|
97
|
+
typescript: {
|
|
98
|
+
tsconfigPath: 'tsconfig.json',
|
|
60
99
|
},
|
|
61
|
-
...
|
|
62
|
-
|
|
100
|
+
...eslintConfigNext,
|
|
101
|
+
formatters: {
|
|
102
|
+
css: true,
|
|
103
|
+
html: true,
|
|
104
|
+
markdown: 'prettier',
|
|
105
|
+
},
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Define ESLint config with default settings.
|
|
110
|
+
*
|
|
111
|
+
* Default configuration includes:
|
|
112
|
+
* - TypeScript support with type-aware rules (tsconfigPath: 'tsconfig.json')
|
|
113
|
+
* - React support
|
|
114
|
+
* - Stylistic formatting rules
|
|
115
|
+
* - Next.js support (auto-detected)
|
|
116
|
+
* - CSS, HTML, and Markdown formatters
|
|
117
|
+
*
|
|
118
|
+
* @param {import('@antfu/eslint-config').OptionsConfig} [options] - ESLint configuration options
|
|
119
|
+
* @param {...import('@antfu/eslint-config').TypedFlatConfigItem} userConfigs - Additional user-defined flat config items
|
|
120
|
+
* @returns {ReturnType<typeof antfu>} ESLint flat config composer
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* Use default configuration (type-aware rules enabled)
|
|
124
|
+
* ```js
|
|
125
|
+
* export { default } from '@dg-scripts/eslint-config'
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* Customize TypeScript options
|
|
130
|
+
* ```js
|
|
131
|
+
* import { defineConfig } from '@dg-scripts/eslint-config'
|
|
132
|
+
*
|
|
133
|
+
* export default defineConfig({
|
|
134
|
+
* typescript: {
|
|
135
|
+
* tsconfigPath: './path/to/tsconfig.json',
|
|
136
|
+
* },
|
|
137
|
+
* })
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* Disable type-aware rules
|
|
142
|
+
* ```js
|
|
143
|
+
* import { defineConfig } from '@dg-scripts/eslint-config'
|
|
144
|
+
*
|
|
145
|
+
* export default defineConfig({
|
|
146
|
+
* typescript: true,
|
|
147
|
+
* })
|
|
148
|
+
* ```
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* Customize ESLint config
|
|
152
|
+
* ```js
|
|
153
|
+
* import { defineConfig } from '@dg-scripts/eslint-config'
|
|
154
|
+
*
|
|
155
|
+
* export default defineConfig(
|
|
156
|
+
* {
|
|
157
|
+
* name: 'base',
|
|
158
|
+
* rules: {
|
|
159
|
+
* 'node/prefer-global/process': 'off',
|
|
160
|
+
* 'react-refresh/only-export-components': 'off',
|
|
161
|
+
* },
|
|
162
|
+
* },
|
|
163
|
+
* {
|
|
164
|
+
* name: 'ui',
|
|
165
|
+
* files: ['src/components/ui/*.tsx'],
|
|
166
|
+
* rules: {
|
|
167
|
+
* 'react/no-children-map': 'off',
|
|
168
|
+
* 'react/no-clone-element': 'off',
|
|
169
|
+
* },
|
|
170
|
+
* },
|
|
171
|
+
* )
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
export function defineConfig(options = {}, ...userConfigs) {
|
|
175
|
+
return antfu(
|
|
176
|
+
{
|
|
177
|
+
...eslintConfigAntfu,
|
|
178
|
+
...options,
|
|
179
|
+
},
|
|
180
|
+
...eslintConfig,
|
|
181
|
+
...userConfigs,
|
|
182
|
+
)
|
|
183
|
+
}
|
|
63
184
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
)
|
|
185
|
+
/**
|
|
186
|
+
* Default ESLint config with type-aware rules enabled.
|
|
187
|
+
*
|
|
188
|
+
* This is equivalent to calling `defineConfig()` without any arguments.
|
|
189
|
+
* Type-aware rules are enabled by default with `tsconfigPath: 'tsconfig.json'`.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```js
|
|
193
|
+
* export { default } from '@dg-scripts/eslint-config'
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
export default defineConfig()
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dg-scripts/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-2288",
|
|
5
5
|
"description": "ESLint configuration used by dg-scripts.",
|
|
6
6
|
"author": "sabertazimi <sabertazimi@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -24,24 +24,34 @@
|
|
|
24
24
|
"eslint-prettier"
|
|
25
25
|
],
|
|
26
26
|
"main": "index.js",
|
|
27
|
+
"types": "index.d.ts",
|
|
28
|
+
"files": [
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"README.md",
|
|
31
|
+
"index.d.ts",
|
|
32
|
+
"index.js",
|
|
33
|
+
"package.json"
|
|
34
|
+
],
|
|
27
35
|
"publishConfig": {
|
|
28
36
|
"access": "public"
|
|
29
37
|
},
|
|
30
38
|
"engines": {
|
|
31
|
-
"node": ">=
|
|
39
|
+
"node": ">=24.0.0"
|
|
32
40
|
},
|
|
33
41
|
"scripts": {
|
|
34
|
-
"lint": "eslint . --config=index.js"
|
|
42
|
+
"lint": "eslint . --config=index.js",
|
|
43
|
+
"lint:fix": "eslint . --config=index.js --fix",
|
|
44
|
+
"lint:report": "eslint-config-inspector --base=/bod/eslint/ --config=index.js --outDir=dist build"
|
|
35
45
|
},
|
|
36
46
|
"peerDependencies": {
|
|
37
|
-
"eslint": "^
|
|
38
|
-
"eslint
|
|
39
|
-
"next": "^
|
|
47
|
+
"@next/eslint-plugin-next": "^16.0.0",
|
|
48
|
+
"eslint": "^10.0.0",
|
|
49
|
+
"next": "^16.0.0",
|
|
40
50
|
"prettier": "^3.0.0",
|
|
41
|
-
"typescript": "^5.0.0"
|
|
51
|
+
"typescript": "^5.0.0 || ^6.0.0"
|
|
42
52
|
},
|
|
43
53
|
"peerDependenciesMeta": {
|
|
44
|
-
"eslint-
|
|
54
|
+
"@next/eslint-plugin-next": {
|
|
45
55
|
"optional": true
|
|
46
56
|
},
|
|
47
57
|
"next": {
|
|
@@ -49,13 +59,15 @@
|
|
|
49
59
|
}
|
|
50
60
|
},
|
|
51
61
|
"dependencies": {
|
|
52
|
-
"@antfu/eslint-config": "^
|
|
53
|
-
"@eslint/
|
|
54
|
-
"eslint-plugin-format": "^0.1
|
|
55
|
-
"eslint-plugin-react": "^
|
|
56
|
-
"eslint-plugin-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
"@antfu/eslint-config": "^9.0.0",
|
|
63
|
+
"@eslint-react/eslint-plugin": "^5.8.3",
|
|
64
|
+
"eslint-plugin-format": "^2.0.1",
|
|
65
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
66
|
+
"eslint-plugin-testing-library": "^7.16.2",
|
|
67
|
+
"local-pkg": "^1.2.0"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@eslint/config-inspector": "^3.0.2"
|
|
71
|
+
},
|
|
72
|
+
"gitHead": "e90fb5455ac90780213c566d62ef1d5406e094a3"
|
|
61
73
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [0.0.0-1867](https://github.com/sabertazimi/bod/compare/v5.17.0...v0.0.0-1867) (2024-03-31)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
9
|
-
|
|
10
|
-
# [5.17.0](https://github.com/sabertazimi/bod/compare/v5.16.0...v5.17.0) (2024-03-30)
|
|
11
|
-
|
|
12
|
-
### Bug Fixes
|
|
13
|
-
|
|
14
|
-
- **deps:** update dependency @antfu/eslint-config to ^2.11.6 ([#1139](https://github.com/sabertazimi/bod/issues/1139)) ([623eab5](https://github.com/sabertazimi/bod/commit/623eab59fb89b5e834a189889513a1ce0b0b96c8))
|
|
15
|
-
- **eslint-config:** project config for type-aware rules ([#1138](https://github.com/sabertazimi/bod/issues/1138)) ([b1ab580](https://github.com/sabertazimi/bod/commit/b1ab58095ae9ab65b9498060cca58ff58b1d1002))
|
|
16
|
-
|
|
17
|
-
### Features
|
|
18
|
-
|
|
19
|
-
- **eslint-config:** config for non type-aware rules ([#1141](https://github.com/sabertazimi/bod/issues/1141)) ([6900b0d](https://github.com/sabertazimi/bod/commit/6900b0de861644c61dd4baf9758ca7740330ccb9))
|
|
20
|
-
|
|
21
|
-
# [5.16.0](https://github.com/sabertazimi/bod/compare/v5.15.2...v5.16.0) (2024-03-30)
|
|
22
|
-
|
|
23
|
-
### Bug Fixes
|
|
24
|
-
|
|
25
|
-
- **eslint-config:** change brace-style to '1tbs' ([#1136](https://github.com/sabertazimi/bod/issues/1136)) ([06529a5](https://github.com/sabertazimi/bod/commit/06529a50b59bbeacb3bec4187a8ac240d8c39026))
|
|
26
|
-
|
|
27
|
-
### Features
|
|
28
|
-
|
|
29
|
-
- **eslint-config:** add optional Next.js support ([#1135](https://github.com/sabertazimi/bod/issues/1135)) ([eeac1bc](https://github.com/sabertazimi/bod/commit/eeac1bcbca17d41e11664a5d8f2212c6778674b3))
|
|
30
|
-
|
|
31
|
-
## [5.15.2](https://github.com/sabertazimi/bod/compare/v5.15.1...v5.15.2) (2024-03-30)
|
|
32
|
-
|
|
33
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
34
|
-
|
|
35
|
-
## [5.15.1](https://github.com/sabertazimi/bod/compare/v5.15.0...v5.15.1) (2024-03-30)
|
|
36
|
-
|
|
37
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
38
|
-
|
|
39
|
-
# [5.15.0](https://github.com/sabertazimi/bod/compare/v5.14.3...v5.15.0) (2024-03-30)
|
|
40
|
-
|
|
41
|
-
### Features
|
|
42
|
-
|
|
43
|
-
- **eslint-config:** ship to flat configuration ([#1133](https://github.com/sabertazimi/bod/issues/1133)) ([3e33201](https://github.com/sabertazimi/bod/commit/3e332013a0f8a7f6d55f068451db0116ec3e62d8))
|
|
44
|
-
|
|
45
|
-
## [5.14.3](https://github.com/sabertazimi/bod/compare/v5.14.2...v5.14.3) (2024-03-05)
|
|
46
|
-
|
|
47
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
48
|
-
|
|
49
|
-
## [5.14.2](https://github.com/sabertazimi/bod/compare/v5.14.1...v5.14.2) (2024-01-20)
|
|
50
|
-
|
|
51
|
-
### Bug Fixes
|
|
52
|
-
|
|
53
|
-
- **deps:** update dependencies (non-major) ([#1075](https://github.com/sabertazimi/bod/issues/1075)) ([e75f127](https://github.com/sabertazimi/bod/commit/e75f1273347faf9831d84b3fc41db0484c549b6c))
|
|
54
|
-
|
|
55
|
-
## [5.14.1](https://github.com/sabertazimi/bod/compare/v5.14.0...v5.14.1) (2023-12-26)
|
|
56
|
-
|
|
57
|
-
### Bug Fixes
|
|
58
|
-
|
|
59
|
-
- **deps:** update dependencies (non-major) ([#1001](https://github.com/sabertazimi/bod/issues/1001)) ([046d35b](https://github.com/sabertazimi/bod/commit/046d35b5d4c15f59e9211107003ebf8fdc11516a))
|
|
60
|
-
- **deps:** update dependencies (non-major) ([#1045](https://github.com/sabertazimi/bod/issues/1045)) ([e89dc14](https://github.com/sabertazimi/bod/commit/e89dc14dcedd5bdb880b701a2635516817bcc6a8))
|
|
61
|
-
- **deps:** update dependencies (non-major) ([#1072](https://github.com/sabertazimi/bod/issues/1072)) ([3373cc7](https://github.com/sabertazimi/bod/commit/3373cc72c66f2297013b1b1db6822ac520113f65))
|
|
62
|
-
- **deps:** update dependency eslint-config-prettier to ^9.1.0 ([#1064](https://github.com/sabertazimi/bod/issues/1064)) ([eaa66fb](https://github.com/sabertazimi/bod/commit/eaa66fb653060386ad950f075654298da08ea09f))
|
|
63
|
-
- **deps:** update dependency eslint-config-prettier to v9 ([#1016](https://github.com/sabertazimi/bod/issues/1016)) ([2e7d863](https://github.com/sabertazimi/bod/commit/2e7d8635a240f9e54e7e3c11fa9df07d7f94fab1))
|
|
64
|
-
|
|
65
|
-
# [5.14.0](https://github.com/sabertazimi/bod/compare/v5.13.5...v5.14.0) (2023-07-08)
|
|
66
|
-
|
|
67
|
-
### Bug Fixes
|
|
68
|
-
|
|
69
|
-
- **deps:** update dependencies (non-major) ([#933](https://github.com/sabertazimi/bod/issues/933)) ([fa21516](https://github.com/sabertazimi/bod/commit/fa215162aa96d79a135cd561730121cff171f5e5))
|
|
70
|
-
|
|
71
|
-
### Features
|
|
72
|
-
|
|
73
|
-
- **deps:** update prettier to v3 ([#997](https://github.com/sabertazimi/bod/issues/997)) ([93ee6fd](https://github.com/sabertazimi/bod/commit/93ee6fdc784acfb989570c1c9e13ab8a1dd9d1bd))
|
|
74
|
-
|
|
75
|
-
## [5.13.5](https://github.com/sabertazimi/bod/compare/v5.13.4...v5.13.5) (2023-03-21)
|
|
76
|
-
|
|
77
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
78
|
-
|
|
79
|
-
## [5.13.4](https://github.com/sabertazimi/bod/compare/v5.13.3...v5.13.4) (2023-03-08)
|
|
80
|
-
|
|
81
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
82
|
-
|
|
83
|
-
## [5.13.3](https://github.com/sabertazimi/bod/compare/v5.13.2...v5.13.3) (2023-02-19)
|
|
84
|
-
|
|
85
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
86
|
-
|
|
87
|
-
## [5.13.2](https://github.com/sabertazimi/bod/compare/v5.13.1...v5.13.2) (2023-02-14)
|
|
88
|
-
|
|
89
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
90
|
-
|
|
91
|
-
## [5.13.1](https://github.com/sabertazimi/bod/compare/v5.13.0...v5.13.1) (2023-02-12)
|
|
92
|
-
|
|
93
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
94
|
-
|
|
95
|
-
# [5.13.0](https://github.com/sabertazimi/bod/compare/v5.12.0...v5.13.0) (2023-02-12)
|
|
96
|
-
|
|
97
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
98
|
-
|
|
99
|
-
# [5.12.0](https://github.com/sabertazimi/bod/compare/v5.11.1...v5.12.0) (2023-02-12)
|
|
100
|
-
|
|
101
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
102
|
-
|
|
103
|
-
## [5.11.1](https://github.com/sabertazimi/bod/compare/v5.11.0...v5.11.1) (2023-02-12)
|
|
104
|
-
|
|
105
|
-
### Bug Fixes
|
|
106
|
-
|
|
107
|
-
- **deps:** update dependencies (non-major) ([#769](https://github.com/sabertazimi/bod/issues/769)) ([3ce05f2](https://github.com/sabertazimi/bod/commit/3ce05f2758cc4b76bdbeb98c5d4d26f9eaffe0a3))
|
|
108
|
-
- **deps:** update dependencies (non-major) ([#875](https://github.com/sabertazimi/bod/issues/875)) ([16d843c](https://github.com/sabertazimi/bod/commit/16d843c97062c25e39e76efe5df20cae8c8aeac9))
|
|
109
|
-
|
|
110
|
-
# [5.11.0](https://github.com/sabertazimi/bod/compare/v5.10.0...v5.11.0) (2022-06-20)
|
|
111
|
-
|
|
112
|
-
### Bug Fixes
|
|
113
|
-
|
|
114
|
-
- **eslint-config:** improve `package.json` sorting ([#758](https://github.com/sabertazimi/bod/issues/758)) ([dd47adc](https://github.com/sabertazimi/bod/commit/dd47adcc7f78a56956421669bb383e9aa0858232))
|
|
115
|
-
|
|
116
|
-
# [5.10.0](https://github.com/sabertazimi/bod/compare/v5.9.0...v5.10.0) (2022-04-30)
|
|
117
|
-
|
|
118
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
119
|
-
|
|
120
|
-
# [5.9.0](https://github.com/sabertazimi/bod/compare/v5.8.1...v5.9.0) (2022-04-19)
|
|
121
|
-
|
|
122
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
123
|
-
|
|
124
|
-
## [5.8.1](https://github.com/sabertazimi/bod/compare/v5.8.0...v5.8.1) (2022-04-03)
|
|
125
|
-
|
|
126
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
127
|
-
|
|
128
|
-
# [5.8.0](https://github.com/sabertazimi/bod/compare/v5.7.0...v5.8.0) (2022-03-20)
|
|
129
|
-
|
|
130
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
131
|
-
|
|
132
|
-
# [5.7.0](https://github.com/sabertazimi/bod/compare/v5.6.2...v5.7.0) (2022-03-19)
|
|
133
|
-
|
|
134
|
-
### Bug Fixes
|
|
135
|
-
|
|
136
|
-
- **deps:** update dependency eslint-config-prettier to ^8.4.0 ([#599](https://github.com/sabertazimi/bod/issues/599)) ([8defa83](https://github.com/sabertazimi/bod/commit/8defa83023710d1fcbda911175456c09be448c92))
|
|
137
|
-
- **deps:** update dependency eslint-config-prettier to ^8.5.0 ([#630](https://github.com/sabertazimi/bod/issues/630)) ([ad65e30](https://github.com/sabertazimi/bod/commit/ad65e309b874fca0011db65ff5e5b8303f26b178))
|
|
138
|
-
- **eslint-config:** improve rules configuration ([#660](https://github.com/sabertazimi/bod/issues/660)) ([bbdb0c0](https://github.com/sabertazimi/bod/commit/bbdb0c02e4aab8c6ef3206f18d96e29503b28032))
|
|
139
|
-
|
|
140
|
-
## [5.6.2](https://github.com/sabertazimi/bod/compare/v5.6.1...v5.6.2) (2022-01-17)
|
|
141
|
-
|
|
142
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
143
|
-
|
|
144
|
-
## [5.6.1](https://github.com/sabertazimi/bod/compare/v5.6.0...v5.6.1) (2021-12-26)
|
|
145
|
-
|
|
146
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
147
|
-
|
|
148
|
-
# [5.6.0](https://github.com/sabertazimi/bod/compare/v5.5.10...v5.6.0) (2021-12-13)
|
|
149
|
-
|
|
150
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
151
|
-
|
|
152
|
-
## [5.5.10](https://github.com/sabertazimi/bod/compare/v5.5.9...v5.5.10) (2021-11-11)
|
|
153
|
-
|
|
154
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
155
|
-
|
|
156
|
-
## [5.5.9](https://github.com/sabertazimi/bod/compare/v5.5.8...v5.5.9) (2021-10-30)
|
|
157
|
-
|
|
158
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
159
|
-
|
|
160
|
-
## [5.5.8](https://github.com/sabertazimi/bod/compare/v5.5.7...v5.5.8) (2021-10-27)
|
|
161
|
-
|
|
162
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
163
|
-
|
|
164
|
-
## [5.5.7](https://github.com/sabertazimi/bod/compare/v5.5.6...v5.5.7) (2021-10-23)
|
|
165
|
-
|
|
166
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
167
|
-
|
|
168
|
-
## [5.5.6](https://github.com/sabertazimi/bod/compare/v5.5.5...v5.5.6) (2021-10-23)
|
|
169
|
-
|
|
170
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
171
|
-
|
|
172
|
-
## [5.5.5](https://github.com/sabertazimi/bod/compare/v5.5.4...v5.5.5) (2021-10-23)
|
|
173
|
-
|
|
174
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
175
|
-
|
|
176
|
-
## [5.5.4](https://github.com/sabertazimi/bod/compare/v5.5.3...v5.5.4) (2021-10-17)
|
|
177
|
-
|
|
178
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
179
|
-
|
|
180
|
-
## [5.5.3](https://github.com/sabertazimi/bod/compare/v5.5.2...v5.5.3) (2021-10-16)
|
|
181
|
-
|
|
182
|
-
### Bug Fixes
|
|
183
|
-
|
|
184
|
-
- **deps:** update dependency eslint to v8 ([#242](https://github.com/sabertazimi/bod/issues/242)) ([f8e0034](https://github.com/sabertazimi/bod/commit/f8e0034b58221a7afa385c11214814882769e513))
|
|
185
|
-
|
|
186
|
-
## [5.5.2](https://github.com/sabertazimi/bod/compare/v5.5.1...v5.5.2) (2021-10-14)
|
|
187
|
-
|
|
188
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
189
|
-
|
|
190
|
-
## [5.5.1](https://github.com/sabertazimi/bod/compare/v5.5.0...v5.5.1) (2021-10-12)
|
|
191
|
-
|
|
192
|
-
**Note:** Version bump only for package @dg-scripts/eslint-config
|
|
193
|
-
|
|
194
|
-
# [5.5.0](https://github.com/sabertazimi/bod/compare/v5.4.1...v5.5.0) (2021-10-12)
|
|
195
|
-
|
|
196
|
-
### Features
|
|
197
|
-
|
|
198
|
-
- **linter:** add `dg-scripts` eslint and stylelint configuration ([2cb283f](https://github.com/sabertazimi/bod/commit/2cb283f8f96fd2381459b284c8d9afccd4b8fd66))
|