@newhighsco/eslint-config 3.0.0 → 3.1.3

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 -1
  2. package/index.js +28 -3
  3. package/package.json +11 -13
package/README.md CHANGED
@@ -27,7 +27,7 @@ Now you can run ESLint by adding the following scripts to your `package.json`. S
27
27
 
28
28
  ```json
29
29
  "scripts": {
30
- "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 .",
31
31
  "format:js": "yarn lint:js --fix"
32
32
  }
33
33
  ```
package/index.js CHANGED
@@ -1,20 +1,45 @@
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: {
11
+ 'json/json-with-comments-files': [],
12
12
  'json/sort-package-json': false
13
13
  },
14
14
  overrides: [
15
+ // Typescript
16
+ {
17
+ files: ['*.ts?(x)'],
18
+ parserOptions: {
19
+ project: './tsconfig.json'
20
+ },
21
+ plugins: ['tsc'],
22
+ rules: {
23
+ 'tsc/config': [
24
+ 'error',
25
+ {
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'
35
+ }
36
+ ],
37
+ '@typescript-eslint/strict-boolean-expressions': 'off'
38
+ }
39
+ },
15
40
  // React
16
41
  {
17
- files: ['*.jsx', '*.mdx'],
42
+ files: ['*.{js,ts,md}x'],
18
43
  env: {
19
44
  browser: true
20
45
  },
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.0.0",
4
+ "version": "3.1.3",
5
5
  "author": "New High Score <hello@newhighsco.re>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -14,24 +14,21 @@
14
14
  },
15
15
  "main": "index.js",
16
16
  "scripts": {
17
+ "prepare": "husky install",
17
18
  "test": "yarn lint",
18
19
  "lint": "npm-run-all --parallel lint:*",
19
- "lint:js": "eslint --ignore-path .gitignore --ext .js,.json .",
20
- "lint:jsx": "yarn lint:js --ext .js,.json,.jsx,.mdx",
20
+ "lint:js": "eslint --ignore-path .gitignore --ext .js,.json,.jsx,.mdx,.ts,.tsx .",
21
21
  "format": "npm-run-all --parallel format:*",
22
- "format:js": "yarn lint:js --fix",
23
- "format:jsx": "yarn lint:jsx --fix"
22
+ "format:js": "yarn lint:js --fix"
24
23
  },
25
- "files": [
26
- "react.js"
27
- ],
24
+ "files": [],
28
25
  "dependencies": {
29
- "@babel/core": "7.17.2",
30
- "@babel/eslint-parser": "7.17.0",
26
+ "@typescript-eslint/eslint-plugin": "5.11.0",
27
+ "@typescript-eslint/parser": "5.11.0",
31
28
  "eslint-config-prettier": "8.3.0",
32
- "eslint-config-standard": "16.0.3",
33
29
  "eslint-config-standard-jsx": "10.0.0",
34
30
  "eslint-config-standard-react": "11.0.1",
31
+ "eslint-config-standard-with-typescript": "21.0.1",
35
32
  "eslint-plugin-import": "2.25.4",
36
33
  "eslint-plugin-json-format": "2.0.1",
37
34
  "eslint-plugin-jsx-a11y": "6.5.1",
@@ -40,7 +37,7 @@
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"
40
+ "eslint-plugin-tsc": "2.0.0"
44
41
  },
45
42
  "devDependencies": {
46
43
  "@commitlint/cli": "16.1.0",
@@ -48,6 +45,7 @@
48
45
  "@newhighsco/editor-config": "1.1.2",
49
46
  "@newhighsco/prettier-config": "2.0.16",
50
47
  "@newhighsco/release-config": "1.1.5",
48
+ "@types/react": "17.0.39",
51
49
  "eslint": "8.8.0",
52
50
  "husky": "7.0.4",
53
51
  "npm-run-all": "4.1.5",
@@ -59,7 +57,7 @@
59
57
  "prettier": "2.5.1"
60
58
  },
61
59
  "resolutions": {
62
- "trim": "^1.0.0"
60
+ "@typescript-eslint/parser": "5.11.0"
63
61
  },
64
62
  "commitlint": {
65
63
  "extends": [