@pumpn/eslint-config 10.4.2 → 11.0.2

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/rules/imports.cjs DELETED
@@ -1,168 +0,0 @@
1
- module.exports = {
2
- env: {
3
- es6: true
4
- },
5
- overrides: [
6
- {
7
- files: "**/**.cjs",
8
- rules: {
9
- "import/no-commonjs": "off",
10
- "import/no-unused-modules": "off"
11
- }
12
- }
13
- ],
14
- parserOptions: {
15
- ecmaVersion: 6,
16
- sourceType: "module"
17
- },
18
- plugins: ["import"],
19
- rules: {
20
- "import/default": "error",
21
- "import/dynamic-import-chunkname": [
22
- "off",
23
- {
24
- importFunctions: [],
25
- webpackChunknameFormat: "[0-9a-zA-Z-_/.]+"
26
- }
27
- ],
28
- "import/export": "error",
29
- "import/exports-last": "error",
30
- "import/extensions": ["error", "ignorePackages"],
31
- "import/first": "error",
32
- "import/group-exports": "off",
33
- "import/max-dependencies": [
34
- "error",
35
- {
36
- max: 10
37
- }
38
- ],
39
- "import/named": "error",
40
- "import/namespace": "error",
41
- "import/newline-after-import": "error",
42
- "import/no-absolute-path": "error",
43
- "import/no-amd": "error",
44
- "import/no-anonymous-default-export": [
45
- "off",
46
- {
47
- allowAnonymousClass: false,
48
- allowAnonymousFunction: false,
49
- allowArray: false,
50
- allowArrowFunction: false,
51
- allowLiteral: false,
52
- allowObject: false
53
- }
54
- ],
55
- "import/no-commonjs": "error",
56
- "import/no-cycle": [
57
- "error",
58
- {
59
- maxDepth: Infinity
60
- }
61
- ],
62
- "import/no-default-export": "off",
63
- "import/no-deprecated": "error",
64
- "import/no-duplicates": "error",
65
- "import/no-dynamic-require": "error",
66
- "import/no-extraneous-dependencies": [
67
- "error",
68
- {
69
- devDependencies: [
70
- "test/**",
71
- "tests/**",
72
- "spec/**",
73
- "**/__tests__/**",
74
- "**/__mocks__/**",
75
- "test.{js,jsx}",
76
- "test-*.{js,jsx}",
77
- "**/*{.,_}{test,spec}.{js,jsx}",
78
- "**/jest.config.js",
79
- "**/jest.setup.js",
80
- "**/vue.config.js",
81
- "**/webpack.config.js",
82
- "**/webpack.config.*.js",
83
- "**/rollup.config.js",
84
- "**/rollup.config.*.js",
85
- "**/gulpfile.js",
86
- "**/gulpfile.*.js",
87
- "**/Gruntfile{,.js}",
88
- "**/protractor.conf.js",
89
- "**/protractor.conf.*.js",
90
- "**/karma.conf.js"
91
- ],
92
- optionalDependencies: false
93
- }
94
- ],
95
- "import/no-internal-modules": [
96
- "off",
97
- {
98
- allow: []
99
- }
100
- ],
101
- "import/no-mutable-exports": "error",
102
- "import/no-named-as-default": "error",
103
- "import/no-named-as-default-member": "error",
104
- "import/no-named-default": "error",
105
- "import/no-named-export": "off",
106
- "import/no-namespace": "error",
107
- "import/no-nodejs-modules": "off",
108
- "import/no-relative-parent-imports": "off",
109
- "import/no-restricted-paths": "off",
110
- "import/no-self-import": "error",
111
- "import/no-unassigned-import": "error",
112
- "import/no-unresolved": [
113
- "error",
114
- {
115
- caseSensitive: true,
116
- commonjs: true
117
- }
118
- ],
119
- "import/no-unused-modules": [
120
- "error",
121
- {
122
- ignoreExports: ["./src/index.*", "./index.*"],
123
- missingExports: true,
124
- unusedExports: false
125
- }
126
- ],
127
- "import/no-useless-path-segments": [
128
- "error",
129
- {
130
- commonjs: true
131
- }
132
- ],
133
- "import/no-webpack-loader-syntax": "error",
134
- "import/order": [
135
- "error",
136
- {
137
- groups: [
138
- "builtin",
139
- "external",
140
- "parent",
141
- "sibling",
142
- "index"
143
- ],
144
- "newlines-between": "always"
145
- }
146
- ],
147
- "import/prefer-default-export": "error",
148
- "import/unambiguous": "off"
149
- },
150
- settings: {
151
- "import/core-modules": [],
152
- "import/extensions": [
153
- ".js",
154
- ".mjs",
155
- ".jsx"
156
- ],
157
- "import/ignore": ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json|cjs)$"],
158
- "import/resolver": {
159
- node: {
160
- extensions: [
161
- ".js",
162
- ".mjs",
163
- ".json"
164
- ]
165
- }
166
- }
167
- }
168
- };
package/rules/jsdoc.cjs DELETED
@@ -1,95 +0,0 @@
1
- module.exports = {
2
- overrides: [
3
- {
4
- files: ["jsdoc-example.js"],
5
- rules: {
6
- "import/no-unused-modules": "off"
7
- }
8
- }
9
- ],
10
- plugins: ["jsdoc"],
11
- rules: {
12
- "jsdoc/check-access": "warn",
13
- "jsdoc/check-alignment": ["warn", "always"],
14
- "jsdoc/check-examples": [
15
- "warn",
16
- {
17
- matchingFileName: "jsdoc-example.js"
18
- }
19
- ],
20
- "jsdoc/check-indentation": [
21
- "warn",
22
- {
23
- excludeTags: ["description", "example"]
24
- }
25
- ],
26
- "jsdoc/check-param-names": "warn",
27
- "jsdoc/check-property-names": "warn",
28
- "jsdoc/check-syntax": "warn",
29
- "jsdoc/check-tag-names": "warn",
30
- "jsdoc/check-types": "warn",
31
- "jsdoc/check-values": "warn",
32
- "jsdoc/empty-tags": "warn",
33
- "jsdoc/implements-on-classes": "warn",
34
- "jsdoc/match-description": "warn",
35
- "jsdoc/newline-after-description": "warn",
36
- "jsdoc/no-bad-blocks": "warn",
37
- "jsdoc/no-defaults": "warn",
38
- "jsdoc/no-undefined-types": "warn",
39
- "jsdoc/require-description": [
40
- "warn",
41
- {
42
- contexts: [
43
- "Program",
44
- "ArrowFunctionExpression",
45
- "FunctionDeclaration",
46
- "FunctionExpression",
47
- "VariableDeclaration"
48
- ]
49
- }
50
- ],
51
- "jsdoc/require-description-complete-sentence": "warn",
52
- "jsdoc/require-example": "warn",
53
- "jsdoc/require-file-overview": "off",
54
- "jsdoc/require-hyphen-before-param-description": "warn",
55
- "jsdoc/require-jsdoc": [
56
- "warn",
57
- {
58
- contexts: [
59
- "ArrowFunctionExpression",
60
- "ClassDeclaration",
61
- "ClassExpression",
62
- "FunctionDeclaration",
63
- "FunctionExpression"
64
- ],
65
- publicOnly: true,
66
- require: {
67
- ArrowFunctionExpression: true,
68
- ClassDeclaration: true,
69
- ClassExpression: true,
70
- FunctionDeclaration: true,
71
- FunctionExpression: true,
72
- MethodDefinition: true
73
- }
74
- }
75
- ],
76
- "jsdoc/require-param": "warn",
77
- "jsdoc/require-param-description": "warn",
78
- "jsdoc/require-param-name": "warn",
79
- "jsdoc/require-param-type": "warn",
80
- "jsdoc/require-property": "warn",
81
- "jsdoc/require-property-description": "warn",
82
- "jsdoc/require-property-name": "warn",
83
- "jsdoc/require-property-type": "warn",
84
- "jsdoc/require-returns": "warn",
85
- "jsdoc/require-returns-check": "warn",
86
- "jsdoc/require-returns-description": "warn",
87
- "jsdoc/require-returns-type": "warn",
88
- "jsdoc/valid-types": "warn"
89
- },
90
- settings: {
91
- jsdoc: {
92
- ignorePrivate: true
93
- }
94
- }
95
- };
package/rules/node.cjs DELETED
@@ -1,23 +0,0 @@
1
- module.exports = {
2
- env: {
3
- node: true
4
- },
5
- rules: {
6
- "callback-return": "off",
7
- "global-require": "error",
8
- "handle-callback-err": ["error", "^(error|.+Error)$"],
9
- "no-buffer-constructor": "error",
10
- "no-mixed-requires": "off",
11
- "no-new-require": "error",
12
- "no-path-concat": "error",
13
- "no-process-env": "off",
14
- "no-process-exit": "off",
15
- "no-restricted-modules": "off",
16
- "no-sync": [
17
- "error",
18
- {
19
- allowAtRootLevel: true
20
- }
21
- ]
22
- }
23
- };
package/rules/strict.cjs DELETED
@@ -1,5 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- strict: ["error", "never"]
4
- }
5
- };
@@ -1,20 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- "array-bracket-newline": [
4
- "error",
5
- {
6
- minItems: 3,
7
- multiline: true
8
- }
9
- ],
10
- "array-bracket-spacing": ["error", "never"],
11
- "array-element-newline": [
12
- "error",
13
- {
14
- minItems: 3,
15
- multiline: true
16
- }
17
- ],
18
- "no-array-constructor": "error"
19
- }
20
- };
@@ -1,49 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- "capitalized-comments": [
4
- "off",
5
- "never",
6
- {
7
- block: {
8
- ignoreConsecutiveComments: true,
9
- ignoreInlineComments: true,
10
- ignorePattern: ".*"
11
- },
12
- line: {
13
- ignoreConsecutiveComments: true,
14
- ignoreInlineComments: true,
15
- ignorePattern: ".*"
16
- }
17
- }
18
- ],
19
- "line-comment-position": [
20
- "error",
21
- {
22
- position: "above"
23
- }
24
- ],
25
- "lines-around-comment": "off",
26
- "multiline-comment-style": ["error", "starred-block"],
27
- "no-inline-comments": "error",
28
- "spaced-comment": [
29
- "error",
30
- "always",
31
- {
32
- block: {
33
- balanced: true,
34
- exceptions: ["-", "+"],
35
- markers: [
36
- "=",
37
- "!",
38
- ":",
39
- "::"
40
- ]
41
- },
42
- line: {
43
- exceptions: ["-", "+"],
44
- markers: ["=", "!"]
45
- }
46
- }
47
- ]
48
- }
49
- };
@@ -1,27 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- "func-call-spacing": ["error", "never"],
4
- "func-name-matching": [
5
- "off",
6
- "always",
7
- {
8
- considerPropertyDescriptor: true,
9
- includeCommonJSModuleExports: false
10
- }
11
- ],
12
- "func-names": ["error", "never"],
13
- "func-style": ["error", "expression"],
14
- "function-call-argument-newline": ["error", "consistent"],
15
- "function-paren-newline": ["error", "consistent"],
16
- "max-lines-per-function": [
17
- "error",
18
- {
19
- IIFEs: true,
20
- max: 50,
21
- skipBlankLines: true,
22
- skipComments: true
23
- }
24
- ],
25
- "space-before-function-paren": ["error", "never"]
26
- }
27
- };
@@ -1,57 +0,0 @@
1
- module.exports = {
2
- plugins: ["sort-keys"],
3
- rules: {
4
- "computed-property-spacing": ["error", "never"],
5
- "key-spacing": [
6
- "error",
7
- {
8
- afterColon: true,
9
- beforeColon: false
10
- }
11
- ],
12
- "no-new-object": "error",
13
- "no-whitespace-before-property": "error",
14
- "object-curly-newline": [
15
- "error",
16
- {
17
- ExportDeclaration: {
18
- minProperties: 1,
19
- multiline: true
20
- },
21
- ImportDeclaration: {
22
- minProperties: 1,
23
- multiline: true
24
- },
25
- ObjectExpression: {
26
- minProperties: 1,
27
- multiline: true
28
- },
29
- ObjectPattern: {
30
- minProperties: 1,
31
- multiline: true
32
- }
33
- }
34
- ],
35
- "object-curly-spacing": ["error", "always"],
36
- "object-property-newline": ["error"],
37
- "prefer-object-spread": "error",
38
- "quote-props": [
39
- "error",
40
- "as-needed",
41
- {
42
- keywords: false,
43
- numbers: false,
44
- unnecessary: true
45
- }
46
- ],
47
- "sort-keys": "off",
48
- "sort-keys/sort-keys-fix": [
49
- "error",
50
- "asc",
51
- {
52
- minKeys: 10,
53
- natural: true
54
- }
55
- ]
56
- }
57
- };
@@ -1,151 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- "implicit-arrow-linebreak": ["error", "beside"],
4
- indent: [
5
- "error",
6
- "tab",
7
- {
8
- ArrayExpression: 1,
9
- CallExpression: {
10
- arguments: 1
11
- },
12
- FunctionDeclaration: {
13
- body: 1,
14
- parameters: 1
15
- },
16
- FunctionExpression: {
17
- body: 1,
18
- parameters: 1
19
- },
20
- ImportDeclaration: 1,
21
- ObjectExpression: 1,
22
- SwitchCase: 1,
23
- VariableDeclarator: 1,
24
- flatTernaryExpressions: false,
25
- ignoreComments: false,
26
- ignoredNodes: [
27
- "JSXElement",
28
- "JSXElement > *",
29
- "JSXAttribute",
30
- "JSXIdentifier",
31
- "JSXNamespacedName",
32
- "JSXMemberExpression",
33
- "JSXSpreadAttribute",
34
- "JSXExpressionContainer",
35
- "JSXOpeningElement",
36
- "JSXClosingElement",
37
- "JSXFragment",
38
- "JSXOpeningFragment",
39
- "JSXClosingFragment",
40
- "JSXText",
41
- "JSXEmptyExpression",
42
- "JSXSpreadChild"
43
- ],
44
- outerIIFEBody: 1
45
- }
46
- ],
47
- "keyword-spacing": [
48
- "error",
49
- {
50
- after: true,
51
- before: true,
52
- overrides: {
53
- case: {
54
- after: true
55
- },
56
- return: {
57
- after: true
58
- },
59
- throw: {
60
- after: true
61
- }
62
- }
63
- }
64
- ],
65
- "linebreak-style": ["error", "unix"],
66
- "lines-between-class-members": [
67
- "error",
68
- "always",
69
- {
70
- exceptAfterSingleLine: false
71
- }
72
- ],
73
- "newline-per-chained-call": "error",
74
- "no-multiple-empty-lines": [
75
- "error",
76
- {
77
- max: 1,
78
- maxBOF: 0,
79
- maxEOF: 0
80
- }
81
- ],
82
- "no-tabs": "off",
83
- "operator-linebreak": [
84
- "error",
85
- "after",
86
- {
87
- overrides: {
88
- ":": "before",
89
- "?": "before",
90
- "|>": "before"
91
- }
92
- }
93
- ],
94
- "padded-blocks": [
95
- "error",
96
- {
97
- blocks: "never",
98
- classes: "never",
99
- switches: "never"
100
- },
101
- {
102
- allowSingleLineBlocks: true
103
- }
104
- ],
105
- "padding-line-between-statements": [
106
- "error",
107
- {
108
- blankLine: "always",
109
- next: "let",
110
- prev: "const"
111
- },
112
- {
113
- blankLine: "always",
114
- next: "const",
115
- prev: "let"
116
- },
117
- ...[
118
- "return",
119
- "export",
120
- "while",
121
- "do",
122
- "for",
123
- "if",
124
- "switch"
125
- ].map((statement) => ({
126
- blankLine: "always",
127
- next: statement,
128
- prev: "*"
129
- })),
130
- ...[
131
- "while",
132
- "do",
133
- "for",
134
- "if",
135
- "switch"
136
- ].map((statement) => ({
137
- blankLine: "always",
138
- next: "*",
139
- prev: statement
140
- }))
141
- ],
142
- "switch-colon-spacing": [
143
- "error",
144
- {
145
- after: true,
146
- before: false
147
- }
148
- ],
149
- "template-tag-spacing": ["error", "never"]
150
- }
151
- };