@cedarjs/eslint-config 5.0.6 → 5.0.7-next.186

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 CHANGED
@@ -6,10 +6,9 @@
6
6
  - [Purpose and Vision](#purpose-and-vision)
7
7
  - [Roadmap](#roadmap)
8
8
  - [Contributing](#contributing)
9
- - [Usage (Flat Config - Recommended)](#usage-flat-config---recommended)
10
- - [Overriding Default Configuration (Flat Config)](#overriding-default-configuration-flat-config)
11
- - [Migration Guide (Optional)](#migration-guide-optional)
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 (Flat Config - Recommended)
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 (Flat Config)
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
- ## Migration Guide (Optional)
97
+ ## Migrating from Legacy (`.eslintrc.js`) Config
99
98
 
100
- **The legacy `.eslintrc.js` format still works** - you don't have to migrate. However, if you want to use the new flat config format, follow these steps:
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
@@ -1,2 +1,3 @@
1
- export default function createConfig(): Promise<any[]>;
1
+ /** @returns {Promise<import('eslint').Linter.FlatConfig[]>} */
2
+ export default function createConfig(): Promise<import("eslint").Linter.FlatConfig[]>;
2
3
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../index.mjs"],"names":[],"mappings":"AAkBA,uDAkKC"}
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
@@ -1,3 +1,4 @@
1
- declare const _default: any[];
2
- export default _default;
1
+ export default sharedConfigs;
2
+ /** @type {import('eslint').Linter.FlatConfig[]} */
3
+ declare const sharedConfigs: import("eslint").Linter.FlatConfig[];
3
4
  //# sourceMappingURL=shared.d.mts.map
@@ -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"}