eslint-config-tamia 7.2.6 → 8.0.1

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.
package/Readme.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # eslint-config-tamia
2
2
 
3
- [![Build Status](https://travis-ci.org/tamiadev/eslint-config-tamia.svg)](https://travis-ci.org/tamiadev/eslint-config-tamia)
4
- [![npm](https://img.shields.io/npm/v/eslint-config-tamia.svg)](https://www.npmjs.com/package/eslint-config-tamia)
3
+ [![npm](https://img.shields.io/npm/v/eslint-config-tamia.svg)](https://www.npmjs.com/package/eslint-config-tamia) [![Node.js CI status](https://github.com/tamiadev/eslint-config-tamia/workflows/Node.js%20CI/badge.svg)](https://github.com/tamiadev/eslint-config-tamia/actions)
5
4
 
6
5
  This package provides [Tâmia’s](http://tamiadev.github.io/tamia/) `.eslintrc` as an extensible shared config. Based on [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb).
7
6
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-config-tamia",
3
3
  "description": "Tâmia ESLint config",
4
- "version": "7.2.6",
4
+ "version": "8.0.1",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "pretest": "npm run lint",
@@ -33,15 +33,16 @@
33
33
  },
34
34
  "homepage": "https://github.com/tamiadev/eslint-config-tamia",
35
35
  "devDependencies": {
36
- "@typescript-eslint/eslint-plugin": "^3.1.0",
37
- "@typescript-eslint/parser": "^3.1.0",
38
- "babel-eslint": "^10.1.0",
39
- "eslint": ">=7",
40
- "eslint-plugin-react": "^7.20.0",
41
- "jest": "^26.0.1",
42
- "react": "^16.13.1"
36
+ "@babel/eslint-parser": "^7.17.0",
37
+ "@babel/preset-react": "^7.16.7",
38
+ "@typescript-eslint/eslint-plugin": "^5.21.0",
39
+ "@typescript-eslint/parser": "^5.21.0",
40
+ "eslint": "^8.14.0",
41
+ "eslint-plugin-react": "^7.29.4",
42
+ "jest": "^28.0.2",
43
+ "react": "^18.1.0"
43
44
  },
44
45
  "peerDependencies": {
45
- "eslint": ">=7"
46
+ "eslint": ">=8"
46
47
  }
47
48
  }
package/react.js CHANGED
@@ -1,4 +1,14 @@
1
1
  module.exports = {
2
- extends: ['./legacy', './rules/es6', './rules/strict', './rules/react'].map(require.resolve),
2
+ extends: ['./legacy', './rules/es6', './rules/strict', './rules/react'].map(
3
+ require.resolve
4
+ ),
5
+ parserOptions: {
6
+ ecmaVersion: 2020,
7
+ sourceType: 'module',
8
+ requireConfigFile: false,
9
+ babelOptions: {
10
+ presets: ['@babel/preset-react'],
11
+ },
12
+ },
3
13
  rules: {},
4
14
  };
package/rules/es6.js CHANGED
@@ -5,6 +5,7 @@ module.exports = {
5
5
  parserOptions: {
6
6
  ecmaVersion: 2020,
7
7
  sourceType: 'module',
8
+ requireConfigFile: false,
8
9
  },
9
10
  rules: {
10
11
  // Disallow duplicate imports
@@ -5,29 +5,27 @@ module.exports = {
5
5
  '@typescript-eslint/adjacent-overload-signatures': 'error',
6
6
  '@typescript-eslint/array-type': 'error',
7
7
  '@typescript-eslint/ban-types': 'error',
8
- '@typescript-eslint/naming-convention': ['error',
8
+ '@typescript-eslint/naming-convention': [
9
+ 'error',
9
10
  {
10
11
  selector: 'default',
11
- format: ['camelCase']
12
+ format: ['camelCase'],
12
13
  },
13
14
  {
14
15
  selector: 'variableLike',
15
- format: ['camelCase', 'PascalCase', 'UPPER_CASE']
16
+ format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
16
17
  },
17
18
  {
18
19
  selector: 'property',
19
- format: ['camelCase', 'PascalCase', 'snake_case', 'UPPER_CASE'],
20
- leadingUnderscore: 'allow',
20
+ format: null,
21
21
  },
22
22
  {
23
23
  selector: 'typeLike',
24
- format: ['PascalCase']
24
+ format: ['PascalCase'],
25
25
  },
26
26
  {
27
- // React: dangerouslySetInnerHTML={{__html: '<div />'}}
28
- selector: 'property',
29
- filter: '^__html$',
30
- format: null,
27
+ selector: 'enumMember',
28
+ format: ['PascalCase', 'UPPER_CASE'],
31
29
  },
32
30
  {
33
31
  // Unused function argument
@@ -35,12 +33,6 @@ module.exports = {
35
33
  filter: '^_$',
36
34
  format: null,
37
35
  },
38
- {
39
- // Quoted property names
40
- selector: 'property',
41
- filter: '[^a-zA-Z0-9_]',
42
- format: null,
43
- },
44
36
  ],
45
37
  '@typescript-eslint/explicit-member-accessibility': 'error',
46
38
  '@typescript-eslint/consistent-type-assertions': 'error',
@@ -60,38 +52,38 @@ module.exports = {
60
52
  },
61
53
  overrides: [
62
54
  {
63
- files: ['*.ts', '*.tsx'],
64
- rules: {
65
- // Disable generic rules that conflict with TypeScript
66
- 'camelcase': 'off',
67
- 'no-array-constructor': 'off',
68
- 'no-unused-vars': 'off',
69
- 'no-unused-expressions': 'off',
70
- 'no-use-before-define': 'off',
55
+ files: ['*.ts', '*.tsx'],
56
+ rules: {
57
+ // Disable generic rules that conflict with TypeScript
58
+ camelcase: 'off',
59
+ 'no-array-constructor': 'off',
60
+ 'no-unused-vars': 'off',
61
+ 'no-unused-expressions': 'off',
62
+ 'no-use-before-define': 'off',
71
63
 
72
- //Checked by Typescript - ts(2378)
73
- 'getter-return': 'off',
74
- // Checked by Typescript - ts(2300)
75
- 'no-dupe-args': 'off',
76
- // Checked by Typescript - ts(1117)
77
- 'no-dupe-keys': 'off',
78
- // Checked by Typescript - ts(7027)
79
- 'no-unreachable': 'off',
80
- // Checked by Typescript - ts(2367)
81
- 'valid-typeof': 'off',
82
- // Checked by Typescript - ts(2588)
83
- 'no-const-assign': 'off',
84
- // Checked by Typescript - ts(2588)
85
- 'no-new-symbol': 'off',
86
- // Checked by Typescript - ts(2376)
87
- 'no-this-before-super': 'off',
88
- // This is checked by Typescript using the option `strictNullChecks`.
89
- 'no-undef': 'off',
90
- // This is already checked by Typescript.
91
- 'no-dupe-class-members': 'off',
92
- // This is already checked by Typescript.
93
- 'no-redeclare': 'off',
94
- },
64
+ //Checked by Typescript - ts(2378)
65
+ 'getter-return': 'off',
66
+ // Checked by Typescript - ts(2300)
67
+ 'no-dupe-args': 'off',
68
+ // Checked by Typescript - ts(1117)
69
+ 'no-dupe-keys': 'off',
70
+ // Checked by Typescript - ts(7027)
71
+ 'no-unreachable': 'off',
72
+ // Checked by Typescript - ts(2367)
73
+ 'valid-typeof': 'off',
74
+ // Checked by Typescript - ts(2588)
75
+ 'no-const-assign': 'off',
76
+ // Checked by Typescript - ts(2588)
77
+ 'no-new-symbol': 'off',
78
+ // Checked by Typescript - ts(2376)
79
+ 'no-this-before-super': 'off',
80
+ // This is checked by Typescript using the option `strictNullChecks`.
81
+ 'no-undef': 'off',
82
+ // This is already checked by Typescript.
83
+ 'no-dupe-class-members': 'off',
84
+ // This is already checked by Typescript.
85
+ 'no-redeclare': 'off',
86
+ },
95
87
  },
96
- ],
88
+ ],
97
89
  };