eslint-config-tamia 7.2.5 → 8.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.
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.5",
4
+ "version": "8.0.0",
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,28 +5,47 @@ 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', {
9
- "selector": "default",
10
- "format": ["camelCase"]
11
- },
12
- {
13
- "selector": "variableLike",
14
- "format": ["camelCase", "PascalCase", "UPPER_CASE"]
15
- },
16
- {
17
- "selector": "property",
18
- "format": ["camelCase", "PascalCase", "snake_case"]
19
- },
20
- {
21
- "selector": "typeLike",
22
- "format": ["PascalCase"]
23
- },
24
- {
25
- // React: dangerouslySetInnerHTML={{__html: '<div />'}}
26
- selector: 'property',
27
- filter: '^__html$',
28
- format: null,
29
- }],
8
+ '@typescript-eslint/naming-convention': ['error',
9
+ {
10
+ selector: 'default',
11
+ format: ['camelCase']
12
+ },
13
+ {
14
+ selector: 'variableLike',
15
+ format: ['camelCase', 'PascalCase', 'UPPER_CASE']
16
+ },
17
+ {
18
+ selector: 'property',
19
+ format: ['camelCase', 'PascalCase', 'snake_case', 'UPPER_CASE'],
20
+ leadingUnderscore: 'allow',
21
+ },
22
+ {
23
+ selector: 'typeLike',
24
+ format: ['PascalCase']
25
+ },
26
+ {
27
+ selector: 'enumMember',
28
+ format: ['PascalCase', 'UPPER_CASE'],
29
+ },
30
+ {
31
+ // React: dangerouslySetInnerHTML={{__html: '<div />'}}
32
+ selector: 'property',
33
+ filter: '^__html$',
34
+ format: null,
35
+ },
36
+ {
37
+ // Unused function argument
38
+ selector: 'variableLike',
39
+ filter: '^_$',
40
+ format: null,
41
+ },
42
+ {
43
+ // Quoted property names
44
+ selector: 'property',
45
+ filter: '[^a-zA-Z0-9_]',
46
+ format: null,
47
+ },
48
+ ],
30
49
  '@typescript-eslint/explicit-member-accessibility': 'error',
31
50
  '@typescript-eslint/consistent-type-assertions': 'error',
32
51
  '@typescript-eslint/no-array-constructor': 'error',