@mareuter/eslint-config 0.1.1 → 0.1.2
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/CHANGELOG.md +7 -0
- package/README.md +23 -3
- package/eslint.config.js +5 -0
- package/package.json +2 -2
- package/react.js +7 -7
- package/turbo.js +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -10,16 +10,36 @@ pnpm add -DE @mareuter/eslint-config
|
|
|
10
10
|
|
|
11
11
|
**Note**: To use this package you must install the peer dependencies. There are multiple configurations in this package.
|
|
12
12
|
|
|
13
|
-
For the
|
|
13
|
+
For the `base` configuration:
|
|
14
|
+
|
|
14
15
|
```
|
|
15
16
|
pnpm add -DE eslint typescript-eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-only-warn @eslint/js
|
|
16
17
|
```
|
|
17
18
|
|
|
18
|
-
For the
|
|
19
|
+
For the `turbo` configuration, install the `base` packages and then:
|
|
20
|
+
|
|
19
21
|
```
|
|
20
22
|
pnpm add -DE eslint-plugin-turbo
|
|
21
23
|
```
|
|
22
24
|
|
|
23
|
-
For the
|
|
25
|
+
For the `react` configuration, install the `base` packages and then:
|
|
26
|
+
|
|
24
27
|
```
|
|
25
28
|
pnpm add -DE eslint-plugin-react eslint-plugin-react-hooks globals
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
Here is a minimal configuration file that extends the provided base configuration:
|
|
34
|
+
|
|
35
|
+
### eslint.config.ts
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
/** @type {import("eslint").Linter.Config} */
|
|
39
|
+
|
|
40
|
+
import { config } from '@mareuter/eslint-config/base'
|
|
41
|
+
|
|
42
|
+
export default config
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The module provides `turbo` and `react` configurations too.
|
package/eslint.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mareuter/eslint-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./base": "./base.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@eslint/js": "^10.0.1",
|
|
35
|
-
"eslint": "^10.
|
|
35
|
+
"eslint": "^10.6.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@eslint/js": "^10.0.1",
|
package/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import pluginReact from
|
|
2
|
-
import pluginReactHooks from
|
|
3
|
-
import globals from
|
|
4
|
-
import { config as baseConfig } from
|
|
1
|
+
import pluginReact from 'eslint-plugin-react'
|
|
2
|
+
import pluginReactHooks from 'eslint-plugin-react-hooks'
|
|
3
|
+
import globals from 'globals'
|
|
4
|
+
import { config as baseConfig } from './base'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A custom ESLint configuration for libraries that use React.
|
|
@@ -21,13 +21,13 @@ export const config = [
|
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
plugins: {
|
|
24
|
-
|
|
24
|
+
'react-hooks': pluginReactHooks,
|
|
25
25
|
},
|
|
26
|
-
settings: { react: { version:
|
|
26
|
+
settings: { react: { version: 'detect' } },
|
|
27
27
|
rules: {
|
|
28
28
|
...pluginReactHooks.configs.recommended.rules,
|
|
29
29
|
// React scope no longer necessary with new JSX transform.
|
|
30
|
-
|
|
30
|
+
'react/react-in-jsx-scope': 'off',
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
]
|
package/turbo.js
CHANGED