@newhighsco/eslint-config 3.1.1 → 3.1.5

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 (3) hide show
  1. package/README.md +1 -12
  2. package/index.js +15 -5
  3. package/package.json +9 -16
package/README.md CHANGED
@@ -23,22 +23,11 @@ New High Score ESLint rules come bundled in `@newhighsco/eslint-config`. To enab
23
23
  }
24
24
  ```
25
25
 
26
- ### Typescript
27
-
28
- ```json
29
- "eslintConfig": {
30
- "extends": ["@newhighsco"],
31
- "parserOptions": {
32
- "project": "tsconfig.json"
33
- }
34
- }
35
- ```
36
-
37
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.
38
27
 
39
28
  ```json
40
29
  "scripts": {
41
- "lint:js": "eslint --cache --ignore-path .gitignore --ext .js,.json,.jsx,.mdx .",
30
+ "lint:js": "eslint --cache --ignore-path .gitignore --ext .js,.json,.jsx,.mdx,.ts,.tsx .",
42
31
  "format:js": "yarn lint:js --fix"
43
32
  }
44
33
  ```
package/index.js CHANGED
@@ -1,12 +1,11 @@
1
1
  module.exports = {
2
- parser: '@babel/eslint-parser',
3
2
  parserOptions: {
4
3
  requireConfigFile: false
5
4
  },
6
5
  env: {
7
6
  jest: true
8
7
  },
9
- extends: ['standard', 'plugin:prettier/recommended'],
8
+ extends: ['standard-with-typescript', 'plugin:prettier/recommended'],
10
9
  plugins: ['json-format'],
11
10
  settings: {
12
11
  'json/json-with-comments-files': [],
@@ -16,15 +15,26 @@ module.exports = {
16
15
  // Typescript
17
16
  {
18
17
  files: ['*.ts?(x)'],
19
- extends: ['standard-with-typescript', 'plugin:prettier/recommended'],
18
+ parserOptions: {
19
+ project: './tsconfig.json'
20
+ },
20
21
  plugins: ['tsc'],
21
22
  rules: {
22
23
  'tsc/config': [
23
24
  'error',
24
25
  {
25
- configFile: 'tsconfig.json'
26
+ configFile: './tsconfig.json'
27
+ }
28
+ ],
29
+ // Overrides standard-with-typescript
30
+ '@typescript-eslint/consistent-type-assertions': [
31
+ 'error',
32
+ {
33
+ assertionStyle: 'as',
34
+ objectLiteralTypeAssertions: 'allow'
26
35
  }
27
- ]
36
+ ],
37
+ '@typescript-eslint/strict-boolean-expressions': 'off'
28
38
  }
29
39
  },
30
40
  // React
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": "3.1.1",
4
+ "version": "3.1.5",
5
5
  "author": "New High Score <hello@newhighsco.re>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -23,12 +23,9 @@
23
23
  },
24
24
  "files": [],
25
25
  "dependencies": {
26
- "@babel/core": "7.17.2",
27
- "@babel/eslint-parser": "7.17.0",
28
- "@typescript-eslint/eslint-plugin": "5.11.0",
29
- "@typescript-eslint/parser": "5.11.0",
26
+ "@typescript-eslint/eslint-plugin": "5.12.0",
27
+ "@typescript-eslint/parser": "5.12.0",
30
28
  "eslint-config-prettier": "8.3.0",
31
- "eslint-config-standard": "16.0.3",
32
29
  "eslint-config-standard-jsx": "10.0.0",
33
30
  "eslint-config-standard-react": "11.0.1",
34
31
  "eslint-config-standard-with-typescript": "21.0.1",
@@ -40,28 +37,27 @@
40
37
  "eslint-plugin-prettier": "4.0.0",
41
38
  "eslint-plugin-promise": "6.0.0",
42
39
  "eslint-plugin-react": "7.28.0",
43
- "eslint-plugin-standard": "4.1.0",
44
40
  "eslint-plugin-tsc": "2.0.0"
45
41
  },
46
42
  "devDependencies": {
47
- "@commitlint/cli": "16.1.0",
48
- "@newhighsco/commitlint-config": "1.0.22",
43
+ "@commitlint/cli": "16.2.1",
44
+ "@newhighsco/commitlint-config": "1.0.23",
49
45
  "@newhighsco/editor-config": "1.1.2",
50
46
  "@newhighsco/prettier-config": "2.0.16",
51
47
  "@newhighsco/release-config": "1.1.5",
52
48
  "@types/react": "17.0.39",
53
- "eslint": "8.8.0",
49
+ "eslint": "8.9.0",
54
50
  "husky": "7.0.4",
55
51
  "npm-run-all": "4.1.5",
56
52
  "prettier": "2.5.1",
57
53
  "semantic-release": "19.0.2"
58
54
  },
59
55
  "peerDependencies": {
60
- "eslint": "8.8.0",
56
+ "eslint": "8.9.0",
61
57
  "prettier": "2.5.1"
62
58
  },
63
59
  "resolutions": {
64
- "trim": "^1.0.0"
60
+ "@typescript-eslint/parser": "5.12.0"
65
61
  },
66
62
  "commitlint": {
67
63
  "extends": [
@@ -69,10 +65,7 @@
69
65
  ]
70
66
  },
71
67
  "eslintConfig": {
72
- "extends": ".",
73
- "parserOptions": {
74
- "project": "tsconfig.json"
75
- }
68
+ "extends": "."
76
69
  },
77
70
  "husky": {
78
71
  "hooks": {