@lipemat/eslint-config 1.0.1 → 2.0.0-beta.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.
Files changed (2) hide show
  1. package/index.js +79 -75
  2. package/package.json +3 -6
package/index.js CHANGED
@@ -1,75 +1,79 @@
1
- module.exports = {
2
- 'extends': [ 'plugin:@wordpress/eslint-plugin/recommended-with-formatting' ],
3
- 'globals': {
4
- '$': 'readonly',
5
- 'jQuery': 'readonly',
6
- },
7
- 'overrides': [ {
8
- 'files': [ '**/*.ts', '**/*.tsx' ],
9
- 'plugins': [
10
- '@typescript-eslint',
11
- ],
12
- //Rules to override the standard JS ones when we get undesired results for TypeScript may be found here
13
- //@link https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
14
- 'rules': {
15
- 'jsdoc/no-undefined-types': [ 0 ],
16
- 'no-magic-numbers': [ 0 ],
17
- "no-redeclare": [ 0 ],
18
- "no-shadow": [ 0 ],
19
- 'no-undef': [ 0 ],
20
- 'semi': [ 0 ],
21
- "@typescript-eslint/no-shadow": [ "error" ],
22
- "@typescript-eslint/no-redeclare": [ "error" ],
23
- '@typescript-eslint/no-unused-vars': 'error',
24
- '@typescript-eslint/type-annotation-spacing': [ 'warn', {
25
- before: false,
26
- after: true,
27
- overrides: {
28
- arrow: {
29
- before: true,
30
- after: true,
31
- },
32
- },
33
- } ],
34
- },
35
- } ],
36
- 'parser': '@typescript-eslint/parser',
37
- 'parserOptions': {
38
- 'ecmaVersion': 7,
39
- 'sourceType': 'module',
40
- },
41
- 'rules': {
42
- 'arrow-parens': [ 1, 'as-needed' ],
43
- 'arrow-spacing': [ 1, {'before': true, 'after': true} ],
44
- 'camelcase': [ 2, {'properties': 'never'} ],
45
- 'indent': [ 1, 'tab', {'SwitchCase': 1} ],
46
- 'lines-around-comment': [ 0 ],
47
- 'jsdoc/require-param': [ 0 ],
48
- 'jsdoc/require-param-type': [ 0 ],
49
- 'jsdoc/require-returns-description': [ 0 ],
50
- 'jsdoc/check-tag-names': [ 1, {'definedTags': [ 'notice', 'link' ]} ],
51
- 'no-console': [ 0 ],
52
- 'no-multiple-empty-lines': [ 'error', {max: 2} ],
53
- 'object-curly-spacing': [ 1, 'never' ],
54
- 'react/no-unescaped-entities': [ 2, {'forbid': [ '>', '}' ]} ],
55
- 'react/display-name': [ 0 ],
56
- 'react-hooks/rules-of-hooks': 'error',
57
- 'react-hooks/exhaustive-deps': 'warn',
58
- 'react/jsx-curly-spacing': [ 1, {'when': 'never', 'allowMultiline': false, children: true} ],
59
- 'react/prop-types': [ 2, {'skipUndeclared': true} ],
60
- 'space-before-blocks': [ 1, 'always' ],
61
- 'space-before-function-paren': [ 'error', {
62
- anonymous: 'never',
63
- named: 'never',
64
- asyncArrow: 'ignore',
65
- } ],
66
- 'space-in-parens': [ 2, 'always' ],
67
- 'template-curly-spacing': [ 1, 'never' ],
68
- 'yoda': [ 2, 'always', {'onlyEquality': true} ],
69
- },
70
- 'settings': {
71
- 'react': {
72
- 'version': '16.8',
73
- },
74
- },
75
- };
1
+ module.exports = {
2
+ "env": {
3
+ "browser": true
4
+ },
5
+ 'extends': [ 'plugin:@wordpress/eslint-plugin/recommended-with-formatting' ],
6
+ 'globals': {
7
+ '$': 'readonly',
8
+ 'jQuery': 'readonly',
9
+ },
10
+ 'overrides': [ {
11
+ 'files': [ '**/*.ts', '**/*.tsx' ],
12
+ 'plugins': [
13
+ '@typescript-eslint',
14
+ ],
15
+ //Rules to override the standard JS ones when we get undesired results for TypeScript may be found here
16
+ //@link https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
17
+ 'rules': {
18
+ 'jsdoc/no-undefined-types': [ 0 ],
19
+ 'no-magic-numbers': [ 0 ],
20
+ "no-redeclare": [ 0 ],
21
+ "no-shadow": [ 0 ],
22
+ 'no-undef': [ 0 ],
23
+ 'semi': [ 0 ],
24
+ "@typescript-eslint/no-shadow": [ "error" ],
25
+ "@typescript-eslint/no-redeclare": [ "error" ],
26
+ '@typescript-eslint/no-unused-vars': 'error',
27
+ '@typescript-eslint/type-annotation-spacing': [ 'warn', {
28
+ before: false,
29
+ after: true,
30
+ overrides: {
31
+ arrow: {
32
+ before: true,
33
+ after: true,
34
+ },
35
+ },
36
+ } ],
37
+ },
38
+ } ],
39
+ 'parser': '@typescript-eslint/parser',
40
+ 'parserOptions': {
41
+ 'ecmaVersion': 7,
42
+ 'sourceType': 'module',
43
+ 'warnOnUnsupportedTypeScriptVersion': false,
44
+ },
45
+ 'rules': {
46
+ 'arrow-parens': [ 1, 'as-needed' ],
47
+ 'arrow-spacing': [ 1, {'before': true, 'after': true} ],
48
+ 'camelcase': [ 2, {'properties': 'never'} ],
49
+ 'indent': [ 1, 'tab', {'SwitchCase': 1} ],
50
+ 'lines-around-comment': [ 0 ],
51
+ 'jsdoc/require-param': [ 0 ],
52
+ 'jsdoc/require-param-type': [ 0 ],
53
+ 'jsdoc/require-returns-description': [ 0 ],
54
+ 'jsdoc/check-tag-names': [ 1, {'definedTags': [ 'notice', 'link' ]} ],
55
+ 'no-console': [ 0 ],
56
+ 'no-multiple-empty-lines': [ 'error', {max: 2} ],
57
+ 'object-curly-spacing': [ 1, 'never' ],
58
+ 'react/no-unescaped-entities': [ 2, {'forbid': [ '>', '}' ]} ],
59
+ 'react/display-name': [ 0 ],
60
+ 'react-hooks/rules-of-hooks': 'error',
61
+ 'react-hooks/exhaustive-deps': 'warn',
62
+ 'react/jsx-curly-spacing': [ 1, {'when': 'never', 'allowMultiline': false, children: true} ],
63
+ 'react/prop-types': [ 2, {'skipUndeclared': true} ],
64
+ 'space-before-blocks': [ 1, 'always' ],
65
+ 'space-before-function-paren': [ 'error', {
66
+ anonymous: 'never',
67
+ named: 'never',
68
+ asyncArrow: 'ignore',
69
+ } ],
70
+ 'space-in-parens': [ 2, 'always' ],
71
+ 'template-curly-spacing': [ 1, 'never' ],
72
+ 'yoda': [ 2, 'always', {'onlyEquality': true} ],
73
+ },
74
+ 'settings': {
75
+ 'react': {
76
+ 'version': '16.8',
77
+ },
78
+ },
79
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lipemat/eslint-config",
3
- "version": "1.0.1",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "Eslint configuration for all @lipemat packages",
5
5
  "engines": {
6
6
  "node": ">=13.0.0"
@@ -16,11 +16,8 @@
16
16
  "author": "lipemat <mat@matlipe.com>",
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
- "@wordpress/eslint-plugin": "^7.4.0",
20
- "@typescript-eslint/eslint-plugin": "^4.11.1",
21
- "@typescript-eslint/parser": "^4.11.1",
22
- "babel-eslint": "^10.1.0",
23
- "eslint": "^7.17.0"
19
+ "@wordpress/eslint-plugin": "^10.0.0",
20
+ "eslint": "^8.8.0"
24
21
  },
25
22
  "publishConfig": {
26
23
  "access": "public"