@vidispine/eslint-config-react 22.4.0-pre.4 → 22.4.0-pre.6

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 +2 -0
  2. package/index.js +7 -7
  3. package/package.json +10 -4
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Add react eslint config
4
4
 
5
+ To add support for typescript (.tsx and .ts files), also add `@vidispine/eslint-config-typescript` as devDependency
6
+
5
7
  ## Usage
6
8
 
7
9
  1. Add **@vidispine/eslint-config** and **eslint (8.x)** as devDependencies,
package/index.js CHANGED
@@ -12,7 +12,7 @@ module.exports = {
12
12
  'react/jsx-filename-extension': [
13
13
  1,
14
14
  {
15
- extensions: ['.js', '.jsx'],
15
+ extensions: ['.js', '.jsx', '.ts', '.tsx'],
16
16
  },
17
17
  ],
18
18
  'react/prop-types': [
@@ -29,7 +29,6 @@ module.exports = {
29
29
  unnamedComponents: 'arrow-function',
30
30
  },
31
31
  ],
32
- // overrides (doesn't extend) base config
33
32
  'import/order': [
34
33
  'error',
35
34
  {
@@ -50,11 +49,6 @@ module.exports = {
50
49
  group: 'builtin',
51
50
  position: 'before',
52
51
  },
53
- {
54
- pattern: '@{material-ui,mui}/**',
55
- group: 'external',
56
- position: 'after',
57
- },
58
52
  {
59
53
  pattern: '@vidispine/**',
60
54
  group: 'parent',
@@ -71,4 +65,10 @@ module.exports = {
71
65
  parserOptions: {
72
66
  ecmaVersion: 2020,
73
67
  },
68
+ overrides: [
69
+ {
70
+ files: ['*.tsx'],
71
+ extends: ['@vidispine/eslint-config-typescript/react'],
72
+ },
73
+ ],
74
74
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidispine/eslint-config-react",
3
- "version": "22.4.0-pre.4",
3
+ "version": "22.4.0-pre.6",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -18,7 +18,7 @@
18
18
  "lint": "eslint . --ext js,md"
19
19
  },
20
20
  "dependencies": {
21
- "@vidispine/eslint-config-base": "22.4.0-pre.4",
21
+ "@vidispine/eslint-config-base": "22.4.0-pre.6",
22
22
  "eslint-config-airbnb": "^19.0.4",
23
23
  "eslint-plugin-import": "^2.25.4",
24
24
  "eslint-plugin-jsx-a11y": "^6.5.1",
@@ -26,11 +26,17 @@
26
26
  "eslint-plugin-react-hooks": "^4.3.0"
27
27
  },
28
28
  "peerDependencies": {
29
+ "@vidispine/eslint-config-typescript": "22.4.0-pre.6",
29
30
  "eslint": "^8.0.0"
30
31
  },
32
+ "peerDependenciesMeta": {
33
+ "@vidispine/eslint-config-typescript": {
34
+ "optional": true
35
+ }
36
+ },
31
37
  "devDependencies": {
32
- "@vidispine/eslint-config-mdx": "22.4.0-pre.4",
33
- "@vidispine/prettier-config": "22.4.0-pre.4",
38
+ "@vidispine/eslint-config-mdx": "22.4.0-pre.6",
39
+ "@vidispine/prettier-config": "22.4.0-pre.6",
34
40
  "eslint": "8.23.1",
35
41
  "prettier": "2.7.1"
36
42
  },