@innovixx/eslint-config 3.0.8 → 3.0.10-alpha.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/LICENSE +1 -1
- package/README.md +29 -40
- package/config/configs/react/rules/react.mjs +4 -1
- package/package.json +26 -19
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,62 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ESLint Config Guide
|
|
2
2
|
|
|
3
3
|
## Highlights
|
|
4
4
|
|
|
5
|
+
An extensible config library for JavaScript developers which utilizes the [flat config](https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-linter) now default in ESlint v9.x.
|
|
6
|
+
|
|
5
7
|
## Quick Start
|
|
6
8
|
|
|
7
9
|
### Installation
|
|
8
10
|
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
```
|
|
12
|
+
npm i --save-dev @innovixx/eslint-config
|
|
13
|
+
```
|
|
14
|
+
```
|
|
15
|
+
yarn add --dev @innovixx/eslint-config
|
|
16
|
+
```
|
|
17
|
+
```
|
|
18
|
+
pnpm i -D @innovixx/eslint-config
|
|
17
19
|
```
|
|
18
20
|
|
|
19
21
|
### Usage
|
|
20
22
|
|
|
21
|
-
There are a number of configurations for consumption
|
|
23
|
+
There are a number of configurations for consumption. For an example of a minimal base configuration:
|
|
22
24
|
|
|
23
25
|
```javascript
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
26
|
+
import baseConfig from '@innovixx/eslint-config/config/configs/base/index.mjs';
|
|
27
|
+
|
|
28
|
+
export default [
|
|
29
|
+
baseConfig,
|
|
30
|
+
{
|
|
31
|
+
files: ['**/*.{js}'],
|
|
32
|
+
},
|
|
33
|
+
];
|
|
33
34
|
```
|
|
35
|
+
This can then be extended to provide the React, TypeScript and Jest Configs also available in the library, as well as custom rules, plugins, and settings. For more information see the [ESLint config guide](https://eslint.org/docs/latest/use/configure/configuration-files)
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```javascript
|
|
38
|
-
{
|
|
39
|
-
test: /\.js$/,
|
|
40
|
-
exclude: /node_modules/,
|
|
41
|
-
loader: 'eslint-loader',
|
|
42
|
-
options: {
|
|
43
|
-
fix: true,
|
|
44
|
-
emitWarning: true,
|
|
45
|
-
},
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
For working examples, see the [demo app](./demo/App.demo.js).
|
|
37
|
+
For working examples, see the [demo app](./demo).
|
|
50
38
|
|
|
51
39
|
## Demo
|
|
52
40
|
|
|
53
|
-
```bash
|
|
54
|
-
$ git clone git@github.com:Innovixx-Development/eslint-config.git
|
|
55
|
-
$ yarn
|
|
56
|
-
$ yarn demo
|
|
57
|
-
$ open http://localhost:3000
|
|
58
41
|
```
|
|
42
|
+
git clone git@github.com:innovixx/eslint-config.git
|
|
43
|
+
pnpm i
|
|
44
|
+
pnpm lint
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The demo directory uses the eslint config file in the [root](https://github.com/innovixx/eslint-config/blob/master/eslint.config.mjs) of the project.
|
|
59
48
|
|
|
60
49
|
## License
|
|
61
50
|
|
|
62
|
-
[MIT](https://github.com/
|
|
51
|
+
[MIT](https://github.com/innovixx/eslint-config/blob/master/LICENSE) Copyright (c) Innovixx Digital Limited
|
|
@@ -293,7 +293,10 @@ const reactRules = {
|
|
|
293
293
|
|
|
294
294
|
// Enforce JSX indentation
|
|
295
295
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md
|
|
296
|
-
'react/jsx-indent': ['error',
|
|
296
|
+
'react/jsx-indent': ['error', 'tab', {
|
|
297
|
+
checkAttributes: true,
|
|
298
|
+
indentLogicalExpressions: true,
|
|
299
|
+
}],
|
|
297
300
|
|
|
298
301
|
// Disallow target="_blank" on links
|
|
299
302
|
// https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-no-target-blank.md
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@innovixx/eslint-config",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10-alpha.1",
|
|
4
4
|
"main": "configs/index.mjs",
|
|
5
5
|
"repository": "git@github.com:innovixx/eslint-config.git",
|
|
6
6
|
"description": "Opinionated ESLint config for JavaScript developers",
|
|
@@ -15,33 +15,40 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"lint": "eslint demo/**/*.{js,jsx,ts,tsx}"
|
|
17
17
|
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"eslint": "^9.26.0"
|
|
20
|
+
},
|
|
18
21
|
"dependencies": {
|
|
19
|
-
"@eslint-react/eslint-plugin": "1.
|
|
20
|
-
"@eslint/js": "9.
|
|
22
|
+
"@eslint-react/eslint-plugin": "1.49.0",
|
|
23
|
+
"@eslint/js": "^9.26.0",
|
|
21
24
|
"@types/eslint": "9.6.1",
|
|
22
25
|
"@types/eslint__js": "8.42.3",
|
|
23
|
-
"@types/node": "^22.
|
|
24
|
-
"@types/react": "^19.
|
|
25
|
-
"@types/react-dom": "^19.
|
|
26
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
27
|
-
"@typescript-eslint/parser": "^8.
|
|
28
|
-
"eslint": "
|
|
26
|
+
"@types/node": "^22.15.18",
|
|
27
|
+
"@types/react": "^19.1.4",
|
|
28
|
+
"@types/react-dom": "^19.1.5",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
30
|
+
"@typescript-eslint/parser": "^8.32.1",
|
|
31
|
+
"eslint-import-resolver-typescript": "^4.3.4",
|
|
29
32
|
"eslint-plugin-import": "^2.31.0",
|
|
30
33
|
"eslint-plugin-jest": "^28.11.0",
|
|
31
34
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
32
35
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
33
|
-
"eslint-plugin-n": "^17.
|
|
34
|
-
"eslint-plugin-react": "^7.37.
|
|
35
|
-
"eslint-plugin-react-hooks": "^5.
|
|
36
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
37
|
-
"eslint-
|
|
38
|
-
"eslint-plugin-sort-export-all": "^1.4.1",
|
|
36
|
+
"eslint-plugin-n": "^17.18.0",
|
|
37
|
+
"eslint-plugin-react": "^7.37.5",
|
|
38
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
39
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
40
|
+
"eslint-plugin-sort-export-all": "^2.1.0",
|
|
39
41
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
40
|
-
"globals": "
|
|
42
|
+
"globals": "16.1.0",
|
|
41
43
|
"react": "^19.0.0",
|
|
42
44
|
"react-dom": "^19.0.0",
|
|
43
|
-
"typescript": "5.
|
|
44
|
-
"typescript-eslint": "8.
|
|
45
|
+
"typescript": "5.8.3",
|
|
46
|
+
"typescript-eslint": "8.32.1"
|
|
45
47
|
},
|
|
46
|
-
"packageManager": "pnpm@10.5.2+sha512.da9dc28cd3ff40d0592188235ab25d3202add8a207afbedc682220e4a0029ffbff4562102b9e6e46b4e3f9e8bd53e6d05de48544b0c57d4b0179e22c76d1199b"
|
|
48
|
+
"packageManager": "pnpm@10.5.2+sha512.da9dc28cd3ff40d0592188235ab25d3202add8a207afbedc682220e4a0029ffbff4562102b9e6e46b4e3f9e8bd53e6d05de48544b0c57d4b0179e22c76d1199b",
|
|
49
|
+
"pnpm": {
|
|
50
|
+
"onlyBuiltDependencies": [
|
|
51
|
+
"unrs-resolver"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
47
54
|
}
|