@wenkol/eslint-config 3.2.0-dev.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/CHANGELOG.md +2216 -0
- package/LICENSE +0 -0
- package/README.md +22 -0
- package/package.json +27 -0
- package/src/index.js +25 -0
- package/src/rules/base.js +38 -0
- package/src/rules/prettier.js +4 -0
- package/src/rules/react.js +35 -0
package/LICENSE
ADDED
|
File without changes
|
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# @clara/eslint-config
|
|
2
|
+
|
|
3
|
+
This package includes the shareable ESLint configuration used by CLI
|
|
4
|
+
|
|
5
|
+
> This is an internal utility, not intended for public usage.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
yarn add @clara/eslint-config
|
|
11
|
+
# or
|
|
12
|
+
npm i @clara/eslint-config
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Contribution
|
|
16
|
+
|
|
17
|
+
Yes please! See the [contributing guidelines](https://github.com) for details.
|
|
18
|
+
|
|
19
|
+
## Licence
|
|
20
|
+
|
|
21
|
+
This project is licensed under the terms of the
|
|
22
|
+
[MIT license](https://github.com/clara).
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wenkol/eslint-config",
|
|
3
|
+
"version": "3.2.0-dev.0",
|
|
4
|
+
"description": "ESLint configutation used by Clara CLI",
|
|
5
|
+
"author": "Noe Sanchez <jonathan.sanchez@clara.team>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "src/index.js",
|
|
8
|
+
"peerDependencies": {
|
|
9
|
+
"eslint": "^8.0.0"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"eslint": "^8.0.0"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@babel/core": "^7.20.5",
|
|
16
|
+
"@babel/eslint-parser": "7.22.9",
|
|
17
|
+
"@rushstack/eslint-patch": "1.3.2",
|
|
18
|
+
"@typescript-eslint/eslint-plugin": "5.28.0",
|
|
19
|
+
"@typescript-eslint/parser": "5.28.0",
|
|
20
|
+
"eslint-config-prettier": "8.5.0",
|
|
21
|
+
"eslint-plugin-import": "2.26.0",
|
|
22
|
+
"eslint-plugin-jsx-a11y": "6.6.1",
|
|
23
|
+
"eslint-plugin-react": "7.31.11",
|
|
24
|
+
"eslint-plugin-react-hooks": "4.6.0"
|
|
25
|
+
},
|
|
26
|
+
"gitHead": "e697a56457eba2924183c11060e9162c7fd26aae"
|
|
27
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ['react-app'],
|
|
3
|
+
env: {
|
|
4
|
+
es6: true,
|
|
5
|
+
browser: true,
|
|
6
|
+
node: true,
|
|
7
|
+
},
|
|
8
|
+
parserOptions: {
|
|
9
|
+
allowImportExportEverywhere: true,
|
|
10
|
+
sourceType: 'module',
|
|
11
|
+
ecmaVersion: 11,
|
|
12
|
+
ecmaFeatures: {
|
|
13
|
+
impliedStrict: true,
|
|
14
|
+
jsx: true,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
settings: {
|
|
18
|
+
'import/resolver': {
|
|
19
|
+
node: {
|
|
20
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
parser: '@typescript-eslint/parser',
|
|
25
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
'eslint:recommended',
|
|
4
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
5
|
+
'plugin:@typescript-eslint/recommended',
|
|
6
|
+
'plugin:import/typescript',
|
|
7
|
+
],
|
|
8
|
+
rules: {
|
|
9
|
+
'no-console': 'off',
|
|
10
|
+
'no-underscore-dangle': 'off',
|
|
11
|
+
'no-shadow': 'off',
|
|
12
|
+
'no-plusplus': 'off',
|
|
13
|
+
'spaced-comment': 'off',
|
|
14
|
+
'guard-for-in': 'off',
|
|
15
|
+
'operator-assignment': 'off',
|
|
16
|
+
'prefer-destructuring': 'off',
|
|
17
|
+
'no-restricted-syntax': 'off',
|
|
18
|
+
'no-continue': 'off',
|
|
19
|
+
eqeqeq: 'off',
|
|
20
|
+
'no-redeclare': 'off',
|
|
21
|
+
'import/prefer-default-export': 'off',
|
|
22
|
+
'import/export': 'off',
|
|
23
|
+
'import/no-extraneous-dependencies': 'off',
|
|
24
|
+
'import/no-named-as-default': 'off',
|
|
25
|
+
'arrow-body-style': 'off',
|
|
26
|
+
// disabled in favor of @typescript-eslint/no-unused-vars
|
|
27
|
+
'no-unused-vars': 'off',
|
|
28
|
+
|
|
29
|
+
// typescript
|
|
30
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
31
|
+
'@typescript-eslint/dot-notation': 'off',
|
|
32
|
+
'@typescript-eslint/lines-between-class-members': 'off',
|
|
33
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
34
|
+
'@typescript-eslint/no-use-before-define': 'off',
|
|
35
|
+
'@typescript-eslint/no-shadow': 'off',
|
|
36
|
+
'@typescript-eslint/no-unused-vars': ['error'],
|
|
37
|
+
},
|
|
38
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
'plugin:react/recommended',
|
|
4
|
+
'plugin:react-hooks/recommended',
|
|
5
|
+
'plugin:jsx-a11y/recommended',
|
|
6
|
+
'plugin:jsx-a11y/recommended',
|
|
7
|
+
],
|
|
8
|
+
plugins: ['import'],
|
|
9
|
+
env: {
|
|
10
|
+
browser: true,
|
|
11
|
+
},
|
|
12
|
+
rules: {
|
|
13
|
+
'react/forbid-prop-types': 'off',
|
|
14
|
+
'react/no-danger': 'off',
|
|
15
|
+
'react/button-has-type': 'off',
|
|
16
|
+
'react/no-unescaped-entities': 'off',
|
|
17
|
+
'react/react-in-jsx-scope': 'off',
|
|
18
|
+
'react/no-children-prop': 'off',
|
|
19
|
+
'react/state-in-constructor': 'off',
|
|
20
|
+
'react/destructuring-assignment': 'off',
|
|
21
|
+
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx'] }],
|
|
22
|
+
'react/jsx-props-no-spreading': 'off',
|
|
23
|
+
'react/no-array-index-key': 'off',
|
|
24
|
+
'react/require-default-props': 'off',
|
|
25
|
+
'react/sort-prop-types': 'error',
|
|
26
|
+
'react/prop-types': 'off',
|
|
27
|
+
'react-hooks/exhaustive-deps': 'error',
|
|
28
|
+
'react/sort-comp': 'off',
|
|
29
|
+
},
|
|
30
|
+
settings: {
|
|
31
|
+
react: {
|
|
32
|
+
version: 'detect',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
}
|