@cedarjs/eslint-config 5.0.6 → 5.0.7-next.219
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 +7 -36
- package/dist/index.d.mts +2 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/shared.d.mts +3 -2
- package/dist/shared.d.mts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/index.mjs +3 -2
- package/package.json +10 -30
- package/shared.mjs +6 -1
- package/dist/index.d.ts +0 -144
- package/dist/index.d.ts.map +0 -1
- package/dist/shared.d.ts +0 -144
- package/dist/shared.d.ts.map +0 -1
- package/index.js +0 -142
- package/shared.js +0 -202
package/README.md
CHANGED
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
- [Purpose and Vision](#purpose-and-vision)
|
|
7
7
|
- [Roadmap](#roadmap)
|
|
8
8
|
- [Contributing](#contributing)
|
|
9
|
-
- [Usage
|
|
10
|
-
- [Overriding Default Configuration
|
|
11
|
-
- [
|
|
12
|
-
- [Legacy Configuration (Still Supported)](#legacy-configuration-still-supported)
|
|
9
|
+
- [Usage](#usage)
|
|
10
|
+
- [Overriding Default Configuration](#overriding-default-configuration)
|
|
11
|
+
- [Migrating from Legacy (`.eslintrc.js`) Config](#migrating-from-legacy-eslintrcjs-config)
|
|
13
12
|
|
|
14
13
|
## Purpose and Vision
|
|
15
14
|
|
|
@@ -32,7 +31,7 @@ Our configuration uses recommended rule presets, including those from [ESLint](h
|
|
|
32
31
|
|
|
33
32
|
This package doesn't depend on other CedarJS Framework packages. To contribute, you should be familiar with the ESLint package. Keep in mind that any rules added should not conflict with code formatting tools (e.g. [Prettier](https://prettier.io/docs/en/integrating-with-linters.html)).
|
|
34
33
|
|
|
35
|
-
## Usage
|
|
34
|
+
## Usage
|
|
36
35
|
|
|
37
36
|
CedarJS uses ESLint's flat config format by default. Create an `eslint.config.js` file in your project root:
|
|
38
37
|
|
|
@@ -45,7 +44,7 @@ export default await cedarConfig()
|
|
|
45
44
|
|
|
46
45
|
Note: The config is async because it needs to load your Cedar project configuration.
|
|
47
46
|
|
|
48
|
-
## Overriding Default Configuration
|
|
47
|
+
## Overriding Default Configuration
|
|
49
48
|
|
|
50
49
|
To override rules in your CedarJS app, add additional config objects after the Cedar config:
|
|
51
50
|
|
|
@@ -95,9 +94,9 @@ export default [
|
|
|
95
94
|
]
|
|
96
95
|
```
|
|
97
96
|
|
|
98
|
-
##
|
|
97
|
+
## Migrating from Legacy (`.eslintrc.js`) Config
|
|
99
98
|
|
|
100
|
-
**The legacy `.eslintrc.js` format
|
|
99
|
+
**The legacy `.eslintrc.js`/`package.json#eslintConfig` format is no longer supported.** Follow these steps to migrate to flat config:
|
|
101
100
|
|
|
102
101
|
1. **Create a new flat config file** in your project root:
|
|
103
102
|
|
|
@@ -137,31 +136,3 @@ export default [
|
|
|
137
136
|
```
|
|
138
137
|
|
|
139
138
|
That's it! Your linting should work the same as before.
|
|
140
|
-
|
|
141
|
-
## Legacy Configuration (Still Supported)
|
|
142
|
-
|
|
143
|
-
The legacy `.eslintrc.js` format is still fully supported. You can continue using it:
|
|
144
|
-
|
|
145
|
-
```javascript
|
|
146
|
-
// cedar-app/.eslintrc.js
|
|
147
|
-
module.exports = {
|
|
148
|
-
extends: ['@cedarjs/eslint-config'],
|
|
149
|
-
root: true,
|
|
150
|
-
rules: {
|
|
151
|
-
'jsx-a11y/no-onchange': 'off',
|
|
152
|
-
},
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Or in `package.json`:
|
|
157
|
-
|
|
158
|
-
```json
|
|
159
|
-
{
|
|
160
|
-
"eslintConfig": {
|
|
161
|
-
"extends": "@cedarjs/eslint-config",
|
|
162
|
-
"root": true
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
**Note:** While both formats are supported, we recommend migrating to flat config when convenient. See the [Migration Guide](#migration-guide-optional) above.
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../index.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../index.mjs"],"names":[],"mappings":"AAiBA,+DAA+D;AAC/D,wCADc,OAAO,CAAC,OAAO,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAoK1D"}
|
package/dist/shared.d.mts
CHANGED
package/dist/shared.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../shared.mjs"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../shared.mjs"],"names":[],"mappings":";AA8BA,mDAAmD;AACnD,6BADW,OAAO,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE,CAoP9C"}
|