@useinsider/eslint-config 1.2.1 → 1.3.0-beta.9
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 +47 -28
- package/dist/base-BAede0cC.js +2793 -0
- package/dist/base-DxTgZSag.cjs +1 -0
- package/dist/base.d.ts +5 -0
- package/dist/compat-BMmtJ5BI.js +15 -0
- package/dist/compat-CkhpJ9YP.cjs +1 -0
- package/dist/configs/config/index.d.ts +3 -0
- package/dist/configs/dom/index.d.ts +3 -0
- package/dist/configs/node/index.d.ts +3 -0
- package/dist/configs/typescript/index.d.ts +5 -0
- package/dist/configs/typescript-dom/index.d.ts +5 -0
- package/dist/configs/vue2/index.d.ts +5 -0
- package/dist/configs/vue3/index.d.ts +5 -0
- package/dist/configs/vue3-typescript/index.d.ts +5 -0
- package/dist/index-Ac6Hw-uA.cjs +1 -0
- package/dist/index-B16ngeJj.js +22 -0
- package/dist/index-B9y7N-hx.js +39 -0
- package/dist/index-BNob5rb3.js +34 -0
- package/dist/index-BaFuYv5N.js +22 -0
- package/dist/index-BtHFk1z3.js +41 -0
- package/dist/index-C6lOnN-C.js +32 -0
- package/dist/index-CAuGyIr4.cjs +1 -0
- package/dist/index-CYJsMDkS.cjs +1 -0
- package/dist/index-CixUmpPQ.js +9 -0
- package/dist/index-FzjaDGwD.cjs +1 -0
- package/dist/index-Rmzbhrzc.cjs +1 -0
- package/dist/index-SyvyuQ5y.cjs +1 -0
- package/dist/index-TqgLVfW-.cjs +1 -0
- package/dist/index-qbptbq51.cjs +1 -0
- package/dist/index-x9l2X-No.js +32 -0
- package/dist/main-BeBiQCVR.js +63 -0
- package/dist/main-tNBIB6QK.cjs +1 -0
- package/dist/main.cjs +1 -0
- package/dist/main.d.ts +18 -0
- package/dist/main.js +4 -0
- package/dist/rules/core.cjs +1 -0
- package/dist/rules/core.d.ts +3 -0
- package/dist/rules/core.js +170 -0
- package/dist/rules/cspell.cjs +1 -0
- package/dist/rules/cspell.d.ts +3 -0
- package/dist/rules/cspell.js +8 -0
- package/dist/rules/jsdoc.cjs +1 -0
- package/dist/rules/jsdoc.d.ts +3 -0
- package/dist/rules/jsdoc.js +28 -0
- package/dist/rules/stylistic.cjs +1 -0
- package/dist/rules/stylistic.d.ts +3 -0
- package/dist/rules/stylistic.js +120 -0
- package/dist/rules/typescript.cjs +1 -0
- package/dist/rules/typescript.d.ts +3 -0
- package/dist/rules/typescript.js +35 -0
- package/dist/rules/vue.cjs +1 -0
- package/dist/rules/vue.d.ts +3 -0
- package/dist/rules/vue.js +178 -0
- package/dist/rules/vue2.cjs +1 -0
- package/dist/rules/vue2.d.ts +3 -0
- package/dist/rules/vue2.js +12 -0
- package/dist/utils/compat.d.ts +7 -0
- package/dist/utils/merge.d.ts +1 -0
- package/dist/utils/mergeAllConfig.d.ts +2 -0
- package/package.json +58 -37
- package/src/base.cjs +0 -10
- package/src/config/README.md +0 -56
- package/src/config/index.cjs +0 -7
- package/src/dom/README.md +0 -56
- package/src/dom/index.cjs +0 -20
- package/src/node/README.md +0 -56
- package/src/node/index.cjs +0 -19
- package/src/rules/README.md +0 -6
- package/src/rules/core.cjs +0 -168
- package/src/rules/cspell.cjs +0 -6
- package/src/rules/jsdoc.cjs +0 -26
- package/src/rules/stylistic.cjs +0 -118
- package/src/rules/typescript.cjs +0 -33
- package/src/rules/vue.cjs +0 -172
- package/src/typescript/README.md +0 -64
- package/src/typescript/index.cjs +0 -44
- package/src/typescript-dom/README.md +0 -85
- package/src/typescript-dom/index.cjs +0 -47
- package/src/vue3/README.md +0 -84
- package/src/vue3/index.cjs +0 -29
- package/src/vue3-typescript/README.md +0 -93
- package/src/vue3-typescript/index.cjs +0 -51
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
- [Table of Contents](#table-of-contents)
|
|
6
6
|
- [Getting Started](#getting-started)
|
|
7
7
|
- [Installation](#installation)
|
|
8
|
-
- [
|
|
9
|
-
- [Available
|
|
8
|
+
- [Examples](#examples)
|
|
9
|
+
- [Available Presets](#available-presets)
|
|
10
10
|
- [Vanilla 🍦](#vanilla-)
|
|
11
11
|
- [Framework-specific](#framework-specific)
|
|
12
12
|
- [⏳ Upcoming Configurations](#-upcoming-configurations)
|
|
@@ -36,56 +36,75 @@ using the `-D` and `-E` flags in your package manager commands.
|
|
|
36
36
|
|
|
37
37
|
You can check the official [ESLint documentation] to get more details.
|
|
38
38
|
3. **Extend the Configuration:**
|
|
39
|
-
Add the following to your
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
Add the following to your `eslint.config.js` file to use the presets:
|
|
40
|
+
```js
|
|
41
|
+
import useInsider from '@useinsider/eslint-config';
|
|
42
|
+
|
|
43
|
+
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
44
|
+
export default [
|
|
45
|
+
await useInsider({
|
|
46
|
+
// See `Available Presets`
|
|
47
|
+
preset: ['dom'],
|
|
48
|
+
config: {
|
|
49
|
+
// Glob file path pattern to specify the target files of the
|
|
50
|
+
// selected presets
|
|
51
|
+
files: ['src/**/*'],
|
|
52
|
+
},
|
|
53
|
+
}),
|
|
54
|
+
await useInsider({
|
|
55
|
+
preset: ['node', 'config'],
|
|
56
|
+
config: {
|
|
57
|
+
files: ['**/eslint.config.js'],
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
];
|
|
45
61
|
```
|
|
62
|
+
4. Adjust your `eslint.config.js` to your projects needs. Choose the right
|
|
63
|
+
preset for the right folder path
|
|
46
64
|
|
|
47
|
-
[ESLint documentation]: https://eslint.org/docs/
|
|
65
|
+
[ESLint documentation]: https://eslint.org/docs/next/use/configure/configuration-files
|
|
48
66
|
|
|
49
|
-
##
|
|
67
|
+
## Examples
|
|
50
68
|
|
|
51
|
-
|
|
69
|
+
Checkout the [examples directory](../../examples) to see various apps with the extended ESLint
|
|
70
|
+
configuration.
|
|
52
71
|
|
|
53
|
-
## Available
|
|
72
|
+
## Available Presets
|
|
54
73
|
|
|
55
74
|
We provide a variety of configurations to suit different environments and
|
|
56
|
-
frameworks. Here's a list of available
|
|
75
|
+
frameworks. Here's a list of available presets:
|
|
57
76
|
|
|
58
77
|
### Vanilla 🍦
|
|
59
78
|
|
|
60
|
-
| Environment | Browser (DOM)
|
|
61
|
-
| :---------------- |
|
|
62
|
-
| **EcmaScript/JS** | [
|
|
63
|
-
| **TypeScript** | [
|
|
64
|
-
| **Config files** |
|
|
79
|
+
| Environment | Browser (DOM) | Node |
|
|
80
|
+
| :---------------- | :------------------------------------------------------ | :---------------------------------------------------------------------------------------------- |
|
|
81
|
+
| **EcmaScript/JS** | [`dom`](./src/configs/dom#readme) | [`@useinsider/eslint-config`](./src/configs/node#readme)<br>[`node`](./src/configs/node#readme) |
|
|
82
|
+
| **TypeScript** | [`typescript-dom`](./src/configs/typescript-dom#readme) | [`typescript`](./src/configs/typescript#readme) |
|
|
83
|
+
| **Config files** | | [`config`](./src/configs/config#readme) |
|
|
65
84
|
|
|
66
85
|
### Framework-specific
|
|
67
86
|
|
|
68
|
-
| Environment | JavaScript
|
|
69
|
-
| :---------- |
|
|
70
|
-
| **Vue 3** | [
|
|
87
|
+
| Environment | JavaScript | TypeScript |
|
|
88
|
+
| :---------- | :---------------------------------- | :-------------------------------------------------------- |
|
|
89
|
+
| **Vue 3** | [`vue3`](./src/configs/vue3#readme) | [`vue3-typescript`](./src/configs/vue3-typescript#readme) |
|
|
71
90
|
|
|
72
91
|
---
|
|
73
92
|
|
|
74
93
|
### ⏳ Upcoming Configurations
|
|
75
94
|
|
|
76
|
-
|
|
95
|
+
Following presets are not available yet!
|
|
77
96
|
|
|
78
97
|
#### Vanilla 🍦
|
|
79
98
|
|
|
80
|
-
| Environment | Browser (DOM)
|
|
81
|
-
| :---------------- |
|
|
82
|
-
| **Legacy ES5 💀** | [
|
|
99
|
+
| Environment | Browser (DOM) | Node |
|
|
100
|
+
| :---------------- | :---------------------------------------------- | :-------------------------------------- |
|
|
101
|
+
| **Legacy ES5 💀** | [`legacy-dom`](./src/configs/legacy-dom#readme) | [`legacy`](./src/configs/legacy#readme) |
|
|
83
102
|
|
|
84
103
|
#### Framework-specific
|
|
85
104
|
|
|
86
|
-
| Environment | JavaScript
|
|
87
|
-
| :---------- |
|
|
88
|
-
| **Vue 2** | [
|
|
105
|
+
| Environment | JavaScript | TypeScript |
|
|
106
|
+
| :---------- | :---------------------------------- | :-------------------------------------------------------- |
|
|
107
|
+
| **Vue 2** | [`vue2`](./src/configs/vue2#readme) | [`vue2-typescript`](./src/configs/vue2-typescript#readme) |
|
|
89
108
|
|
|
90
109
|
## Contributing
|
|
91
110
|
|