@allthings/eslint-config 2.2.3 → 3.0.0

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.
Files changed (4) hide show
  1. package/README.md +27 -7
  2. package/index.js +351 -424
  3. package/node.js +317 -389
  4. package/package.json +10 -5
package/README.md CHANGED
@@ -10,22 +10,42 @@ yarn add -DE @allthings/eslint-config
10
10
 
11
11
  ## Usage
12
12
 
13
- Add this to your .eslintrc.js
13
+ Create an `eslint.config.js` at your project root.
14
14
 
15
15
  ### React projects
16
16
 
17
17
  ```js
18
- module.exports = {
19
- extends: ['@allthings/eslint-config'],
20
- }
18
+ import allthingsConfig from '@allthings/eslint-config'
19
+
20
+ export default [
21
+ ...allthingsConfig,
22
+ {
23
+ languageOptions: {
24
+ parserOptions: {
25
+ project: './tsconfig.json',
26
+ tsconfigRootDir: import.meta.dirname,
27
+ },
28
+ },
29
+ },
30
+ ]
21
31
  ```
22
32
 
23
33
  ### Node.js projects
24
34
 
25
35
  ```js
26
- module.exports = {
27
- extends: ['@allthings/eslint-config/node'],
28
- }
36
+ import allthingsNodeConfig from '@allthings/eslint-config/node'
37
+
38
+ export default [
39
+ ...allthingsNodeConfig,
40
+ {
41
+ languageOptions: {
42
+ parserOptions: {
43
+ project: './tsconfig.json',
44
+ tsconfigRootDir: import.meta.dirname,
45
+ },
46
+ },
47
+ },
48
+ ]
29
49
  ```
30
50
 
31
51
  ## Deployment