@lipemat/eslint-config 3.1.2 → 3.1.3

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/helpers/config.js CHANGED
@@ -47,4 +47,4 @@ function getConfig( mergedConfig ) {
47
47
 
48
48
  module.exports = {
49
49
  getConfig,
50
- }
50
+ };
package/index.js CHANGED
@@ -1,44 +1,42 @@
1
- const {getConfig} = require( './helpers/config' );
2
-
3
1
  /**
4
2
  * Default config if no extensions override it.
5
3
  *
6
4
  */
7
- let mergedConfig = {
8
- "env": {
9
- "browser": true
5
+ let mergedConfig = {
6
+ env: {
7
+ browser: true,
10
8
  },
11
- 'extends': [
9
+ extends: [
12
10
  'plugin:@wordpress/eslint-plugin/recommended-with-formatting',
13
- 'plugin:import/typescript'
11
+ 'plugin:import/typescript',
14
12
  ],
15
- 'globals': {
16
- '$': 'readonly',
17
- 'jQuery': 'readonly',
13
+ globals: {
14
+ $: 'readonly',
15
+ jQuery: 'readonly',
18
16
  },
19
- 'overrides': [ {
20
- 'files': [ '**/*.ts', '**/*.tsx' ],
21
- 'plugins': [
17
+ overrides: [ {
18
+ files: [ '**/*.ts', '**/*.tsx' ],
19
+ plugins: [
22
20
  '@typescript-eslint',
23
21
  ],
24
22
  //Rules to override the standard JS ones when we get undesired results for TypeScript may be found here
25
23
  //@link https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
26
- 'rules': {
24
+ rules: {
27
25
  'jsdoc/no-undefined-types': [ 0 ],
28
26
  'no-magic-numbers': [ 0 ],
29
- "no-redeclare": [ 0 ],
30
- "no-shadow": [ 0 ],
27
+ 'no-redeclare': [ 0 ],
28
+ 'no-shadow': [ 0 ],
31
29
  'no-undef': [ 0 ],
32
- 'semi': [ 0 ],
33
- "@typescript-eslint/no-shadow": [ "error" ],
34
- "@typescript-eslint/no-redeclare": [ "error" ],
30
+ semi: [ 0 ],
31
+ '@typescript-eslint/no-shadow': [ 'error' ],
32
+ '@typescript-eslint/no-redeclare': [ 'error' ],
35
33
  '@typescript-eslint/no-unused-vars': 'error',
36
- "@typescript-eslint/strict-boolean-expressions": [
37
- "warn",
34
+ '@typescript-eslint/strict-boolean-expressions': [
35
+ 'warn',
38
36
  {
39
- "allowString": false,
40
- "allowNumber": false
41
- }
37
+ allowString: false,
38
+ allowNumber: false,
39
+ },
42
40
  ],
43
41
  '@typescript-eslint/type-annotation-spacing': [ 'warn', {
44
42
  before: false,
@@ -52,40 +50,40 @@ let mergedConfig = {
52
50
  } ],
53
51
  },
54
52
  } ],
55
- 'parser': '@typescript-eslint/parser',
56
- 'parserOptions': {
57
- 'ecmaVersion': 7,
58
- 'project': './tsconfig.json',
59
- 'sourceType': 'module',
60
- 'warnOnUnsupportedTypeScriptVersion': false,
53
+ parser: '@typescript-eslint/parser',
54
+ parserOptions: {
55
+ ecmaVersion: 7,
56
+ project: './tsconfig.json',
57
+ sourceType: 'module',
58
+ warnOnUnsupportedTypeScriptVersion: false,
61
59
  },
62
- 'rules': {
60
+ rules: {
63
61
  'arrow-parens': [ 1, 'as-needed' ],
64
- 'arrow-spacing': [ 1, {'before': true, 'after': true} ],
65
- 'camelcase': [ 2, {'properties': 'never'} ],
66
- 'indent': [ 1, 'tab', {'SwitchCase': 1} ],
62
+ 'arrow-spacing': [ 1, {before: true, after: true} ],
63
+ camelcase: [ 2, {properties: 'never'} ],
64
+ indent: [ 1, 'tab', {SwitchCase: 1} ],
67
65
  'lines-around-comment': [ 0 ],
68
66
  'jsdoc/require-param': [ 0 ],
69
67
  'jsdoc/require-param-type': [ 0 ],
70
68
  'jsdoc/require-returns-description': [ 0 ],
71
- 'jsdoc/check-tag-names': [ 1, {'definedTags': [ 'notice', 'link', 'task', 'ticket', 'note' ]} ],
69
+ 'jsdoc/check-tag-names': [ 1, {definedTags: [ 'notice', 'link', 'task', 'ticket', 'note' ]} ],
72
70
 
73
71
  /**
74
72
  * Disable rule until the bug is resolved.
75
73
  *
76
74
  * @link https://github.com/import-js/eslint-plugin-import/issues/2267
77
75
  */
78
- "import/no-unresolved": [ 0 ],
76
+ 'import/no-unresolved': [ 0 ],
79
77
 
80
78
  'no-console': [ 0 ],
81
79
  'no-multiple-empty-lines': [ 'error', {max: 2} ],
82
80
  'object-curly-spacing': [ 1, 'never' ],
83
- 'react/no-unescaped-entities': [ 2, {'forbid': [ '>', '}' ]} ],
81
+ 'react/no-unescaped-entities': [ 2, {forbid: [ '>', '}' ]} ],
84
82
  'react/display-name': [ 0 ],
85
83
  'react-hooks/rules-of-hooks': 'error',
86
84
  'react-hooks/exhaustive-deps': 'warn',
87
- 'react/jsx-curly-spacing': [ 1, {'when': 'never', 'allowMultiline': false, children: true} ],
88
- 'react/prop-types': [ 2, {'skipUndeclared': true} ],
85
+ 'react/jsx-curly-spacing': [ 1, {when: 'never', allowMultiline: false, children: true} ],
86
+ 'react/prop-types': [ 2, {skipUndeclared: true} ],
89
87
  'space-before-blocks': [ 1, 'always' ],
90
88
  'space-before-function-paren': [ 'error', {
91
89
  anonymous: 'never',
@@ -94,12 +92,12 @@ let mergedConfig = {
94
92
  } ],
95
93
  'space-in-parens': [ 2, 'always' ],
96
94
  'template-curly-spacing': [ 1, 'never' ],
97
- 'yoda': [ 2, 'always', {'onlyEquality': true} ],
95
+ yoda: [ 2, 'always', {onlyEquality: true} ],
98
96
  },
99
- 'root': true,
100
- 'settings': {
101
- 'react': {
102
- 'version': '18.0',
97
+ root: true,
98
+ settings: {
99
+ react: {
100
+ version: '18.0',
103
101
  },
104
102
  },
105
103
  };
@@ -108,8 +106,9 @@ let mergedConfig = {
108
106
  * Merge in any extensions' config.
109
107
  */
110
108
  try {
109
+ const {getConfig} = require( './helpers/config' );
111
110
  mergedConfig = getConfig( mergedConfig );
112
- } catch( e ) {
111
+ } catch ( e ) {
113
112
  // JS Boilerplate is not installed.
114
113
  }
115
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lipemat/eslint-config",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "license": "MIT",
5
5
  "description": "Eslint configuration for all @lipemat packages",
6
6
  "engines": {