@newhighsco/eslint-config 2.3.62 → 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 +1 -17
  2. package/index.js +21 -1
  3. package/package.json +2 -2
  4. package/react.js +0 -17
package/README.md CHANGED
@@ -23,31 +23,15 @@ New High Score ESLint rules come bundled in `@newhighsco/eslint-config`. To enab
23
23
  }
24
24
  ```
25
25
 
26
- ### React
27
-
28
- ```json
29
- "eslintConfig": {
30
- "extends": ["@newhighsco/eslint-config/react"]
31
- }
32
- ```
33
-
34
26
  Now you can run ESLint by adding the following scripts to your `package.json`. See the [ESLint CLI docs](https://eslint.org/docs/user-guide/command-line-interface) for more details.
35
27
 
36
28
  ```json
37
29
  "scripts": {
38
- "lint:js": "eslint --cache --ignore-path .gitignore --ext .js,.json .",
30
+ "lint:js": "eslint --cache --ignore-path .gitignore --ext .js,.json,.jsx,.mdx .",
39
31
  "format:js": "yarn lint:js --fix"
40
32
  }
41
33
  ```
42
34
 
43
- ### React
44
-
45
- ```json
46
- "scripts": {
47
- "lint:js": "eslint --cache --ext .js,.json,.jsx,.mdx .",
48
- }
49
- ```
50
-
51
35
  Lint it:
52
36
 
53
37
  ```
package/index.js CHANGED
@@ -10,5 +10,25 @@ module.exports = {
10
10
  plugins: ['json-format'],
11
11
  settings: {
12
12
  'json/sort-package-json': false
13
- }
13
+ },
14
+ overrides: [
15
+ // React
16
+ {
17
+ files: ['*.jsx', '*.mdx'],
18
+ env: {
19
+ browser: true
20
+ },
21
+ extends: [
22
+ 'standard-react',
23
+ 'standard-jsx',
24
+ 'plugin:prettier/recommended',
25
+ 'plugin:jsx-a11y/recommended',
26
+ 'plugin:mdx/recommended'
27
+ ],
28
+ rules: {
29
+ // Overrides standard-react
30
+ 'jsx-quotes': ['error', 'prefer-double']
31
+ }
32
+ }
33
+ ]
14
34
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newhighsco/eslint-config",
3
3
  "description": "New High Score shareable config for ESLint",
4
- "version": "2.3.62",
4
+ "version": "3.0.0",
5
5
  "author": "New High Score <hello@newhighsco.re>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -17,7 +17,7 @@
17
17
  "test": "yarn lint",
18
18
  "lint": "npm-run-all --parallel lint:*",
19
19
  "lint:js": "eslint --ignore-path .gitignore --ext .js,.json .",
20
- "lint:jsx": "yarn lint:js --ext .js,.json,.jsx,.mdx --config ./react.js",
20
+ "lint:jsx": "yarn lint:js --ext .js,.json,.jsx,.mdx",
21
21
  "format": "npm-run-all --parallel format:*",
22
22
  "format:js": "yarn lint:js --fix",
23
23
  "format:jsx": "yarn lint:jsx --fix"
package/react.js DELETED
@@ -1,17 +0,0 @@
1
- module.exports = {
2
- env: {
3
- browser: true
4
- },
5
- extends: [
6
- '.',
7
- 'standard-react',
8
- 'standard-jsx',
9
- 'plugin:prettier/recommended',
10
- 'plugin:jsx-a11y/recommended',
11
- 'plugin:mdx/recommended'
12
- ],
13
- rules: {
14
- // Overrides standard-react
15
- 'jsx-quotes': ['error', 'prefer-double']
16
- }
17
- }