immosquare-cleaner 0.1.34 → 0.1.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/lib/immosquare-cleaner.rb +2 -2
- data/linters/eslint.config.mjs +30 -0
- data/linters/rubocop-3.2.2.yml +2 -0
- data/node_modules/function-bind/README.md +27 -25
- data/node_modules/function-bind/implementation.js +12 -44
- data/node_modules/function-bind/package.json +14 -38
- data/node_modules/is-core-module/CHANGELOG.md +0 -7
- data/node_modules/is-core-module/index.js +2 -2
- data/node_modules/is-core-module/package.json +4 -4
- data/package.json +2 -4
- metadata +3 -180
- data/linters/eslintrc.json +0 -57
- data/node_modules/.bin/rimraf +0 -1
- data/node_modules/eslint-config-airbnb-base/CHANGELOG.md +0 -374
- data/node_modules/eslint-config-airbnb-base/LICENSE.md +0 -21
- data/node_modules/eslint-config-airbnb-base/README.md +0 -112
- data/node_modules/eslint-config-airbnb-base/index.js +0 -17
- data/node_modules/eslint-config-airbnb-base/legacy.js +0 -34
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/LICENSE +0 -15
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/README.md +0 -443
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/bin/semver.js +0 -174
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/package.json +0 -38
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/range.bnf +0 -16
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/semver.js +0 -1643
- data/node_modules/eslint-config-airbnb-base/package.json +0 -95
- data/node_modules/eslint-config-airbnb-base/rules/best-practices.js +0 -408
- data/node_modules/eslint-config-airbnb-base/rules/errors.js +0 -179
- data/node_modules/eslint-config-airbnb-base/rules/es6.js +0 -185
- data/node_modules/eslint-config-airbnb-base/rules/imports.js +0 -273
- data/node_modules/eslint-config-airbnb-base/rules/node.js +0 -43
- data/node_modules/eslint-config-airbnb-base/rules/strict.js +0 -6
- data/node_modules/eslint-config-airbnb-base/rules/style.js +0 -529
- data/node_modules/eslint-config-airbnb-base/rules/variables.js +0 -56
- data/node_modules/eslint-config-airbnb-base/test/requires.js +0 -13
- data/node_modules/eslint-config-airbnb-base/test/test-base.js +0 -32
- data/node_modules/eslint-config-airbnb-base/whitespace-async.js +0 -96
- data/node_modules/eslint-config-airbnb-base/whitespace.js +0 -102
- data/node_modules/eslint-plugin-import/CHANGELOG.md +0 -1925
- data/node_modules/eslint-plugin-import/CONTRIBUTING.md +0 -84
- data/node_modules/eslint-plugin-import/LICENSE +0 -22
- data/node_modules/eslint-plugin-import/README.md +0 -500
- data/node_modules/eslint-plugin-import/RELEASE.md +0 -54
- data/node_modules/eslint-plugin-import/SECURITY.md +0 -11
- data/node_modules/eslint-plugin-import/config/electron.js +0 -8
- data/node_modules/eslint-plugin-import/config/errors.js +0 -14
- data/node_modules/eslint-plugin-import/config/react-native.js +0 -13
- data/node_modules/eslint-plugin-import/config/react.js +0 -18
- data/node_modules/eslint-plugin-import/config/recommended.js +0 -28
- data/node_modules/eslint-plugin-import/config/stage-0.js +0 -12
- data/node_modules/eslint-plugin-import/config/typescript.js +0 -34
- data/node_modules/eslint-plugin-import/config/warnings.js +0 -12
- data/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md +0 -91
- data/node_modules/eslint-plugin-import/docs/rules/default.md +0 -72
- data/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md +0 -92
- data/node_modules/eslint-plugin-import/docs/rules/export.md +0 -37
- data/node_modules/eslint-plugin-import/docs/rules/exports-last.md +0 -51
- data/node_modules/eslint-plugin-import/docs/rules/extensions.md +0 -174
- data/node_modules/eslint-plugin-import/docs/rules/first.md +0 -75
- data/node_modules/eslint-plugin-import/docs/rules/group-exports.md +0 -118
- data/node_modules/eslint-plugin-import/docs/rules/imports-first.md +0 -9
- data/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md +0 -70
- data/node_modules/eslint-plugin-import/docs/rules/named.md +0 -102
- data/node_modules/eslint-plugin-import/docs/rules/namespace.md +0 -106
- data/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md +0 -167
- data/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md +0 -54
- data/node_modules/eslint-plugin-import/docs/rules/no-amd.md +0 -37
- data/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md +0 -83
- data/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md +0 -96
- data/node_modules/eslint-plugin-import/docs/rules/no-cycle.md +0 -111
- data/node_modules/eslint-plugin-import/docs/rules/no-default-export.md +0 -65
- data/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md +0 -62
- data/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md +0 -109
- data/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md +0 -25
- data/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md +0 -49
- data/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md +0 -139
- data/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md +0 -81
- data/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md +0 -136
- data/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md +0 -54
- data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md +0 -52
- data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md +0 -53
- data/node_modules/eslint-plugin-import/docs/rules/no-named-default.md +0 -36
- data/node_modules/eslint-plugin-import/docs/rules/no-named-export.md +0 -79
- data/node_modules/eslint-plugin-import/docs/rules/no-namespace.md +0 -44
- data/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md +0 -42
- data/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md +0 -70
- data/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md +0 -123
- data/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md +0 -198
- data/node_modules/eslint-plugin-import/docs/rules/no-self-import.md +0 -32
- data/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md +0 -60
- data/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md +0 -110
- data/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md +0 -125
- data/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md +0 -85
- data/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md +0 -39
- data/node_modules/eslint-plugin-import/docs/rules/order.md +0 -365
- data/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md +0 -185
- data/node_modules/eslint-plugin-import/docs/rules/unambiguous.md +0 -57
- data/node_modules/eslint-plugin-import/lib/ExportMap.js +0 -856
- data/node_modules/eslint-plugin-import/lib/core/importType.js +0 -129
- data/node_modules/eslint-plugin-import/lib/core/packagePath.js +0 -22
- data/node_modules/eslint-plugin-import/lib/core/staticRequire.js +0 -11
- data/node_modules/eslint-plugin-import/lib/docsUrl.js +0 -8
- data/node_modules/eslint-plugin-import/lib/importDeclaration.js +0 -5
- data/node_modules/eslint-plugin-import/lib/index.js +0 -71
- data/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js +0 -221
- data/node_modules/eslint-plugin-import/lib/rules/default.js +0 -40
- data/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js +0 -120
- data/node_modules/eslint-plugin-import/lib/rules/export.js +0 -250
- data/node_modules/eslint-plugin-import/lib/rules/exports-last.js +0 -40
- data/node_modules/eslint-plugin-import/lib/rules/extensions.js +0 -193
- data/node_modules/eslint-plugin-import/lib/rules/first.js +0 -144
- data/node_modules/eslint-plugin-import/lib/rules/group-exports.js +0 -155
- data/node_modules/eslint-plugin-import/lib/rules/imports-first.js +0 -16
- data/node_modules/eslint-plugin-import/lib/rules/max-dependencies.js +0 -60
- data/node_modules/eslint-plugin-import/lib/rules/named.js +0 -143
- data/node_modules/eslint-plugin-import/lib/rules/namespace.js +0 -218
- data/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js +0 -237
- data/node_modules/eslint-plugin-import/lib/rules/no-absolute-path.js +0 -40
- data/node_modules/eslint-plugin-import/lib/rules/no-amd.js +0 -47
- data/node_modules/eslint-plugin-import/lib/rules/no-anonymous-default-export.js +0 -103
- data/node_modules/eslint-plugin-import/lib/rules/no-commonjs.js +0 -141
- data/node_modules/eslint-plugin-import/lib/rules/no-cycle.js +0 -158
- data/node_modules/eslint-plugin-import/lib/rules/no-default-export.js +0 -43
- data/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js +0 -138
- data/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js +0 -354
- data/node_modules/eslint-plugin-import/lib/rules/no-dynamic-require.js +0 -77
- data/node_modules/eslint-plugin-import/lib/rules/no-empty-named-blocks.js +0 -105
- data/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js +0 -301
- data/node_modules/eslint-plugin-import/lib/rules/no-import-module-exports.js +0 -85
- data/node_modules/eslint-plugin-import/lib/rules/no-internal-modules.js +0 -144
- data/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js +0 -59
- data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default-member.js +0 -96
- data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js +0 -45
- data/node_modules/eslint-plugin-import/lib/rules/no-named-default.js +0 -31
- data/node_modules/eslint-plugin-import/lib/rules/no-named-export.js +0 -39
- data/node_modules/eslint-plugin-import/lib/rules/no-namespace.js +0 -175
- data/node_modules/eslint-plugin-import/lib/rules/no-nodejs-modules.js +0 -44
- data/node_modules/eslint-plugin-import/lib/rules/no-relative-packages.js +0 -71
- data/node_modules/eslint-plugin-import/lib/rules/no-relative-parent-imports.js +0 -48
- data/node_modules/eslint-plugin-import/lib/rules/no-restricted-paths.js +0 -245
- data/node_modules/eslint-plugin-import/lib/rules/no-self-import.js +0 -39
- data/node_modules/eslint-plugin-import/lib/rules/no-unassigned-import.js +0 -79
- data/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js +0 -60
- data/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js +0 -945
- data/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js +0 -147
- data/node_modules/eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js +0 -26
- data/node_modules/eslint-plugin-import/lib/rules/order.js +0 -785
- data/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js +0 -116
- data/node_modules/eslint-plugin-import/lib/rules/unambiguous.js +0 -38
- data/node_modules/eslint-plugin-import/memo-parser/LICENSE +0 -22
- data/node_modules/eslint-plugin-import/memo-parser/README.md +0 -21
- data/node_modules/eslint-plugin-import/memo-parser/index.js +0 -41
- data/node_modules/eslint-plugin-import/node_modules/debug/CHANGELOG.md +0 -395
- data/node_modules/eslint-plugin-import/node_modules/debug/LICENSE +0 -19
- data/node_modules/eslint-plugin-import/node_modules/debug/README.md +0 -437
- data/node_modules/eslint-plugin-import/node_modules/debug/node.js +0 -1
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/index.js +0 -162
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/license.md +0 -21
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/package.json +0 -38
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/readme.md +0 -59
- data/node_modules/eslint-plugin-import/node_modules/debug/package.json +0 -51
- data/node_modules/eslint-plugin-import/node_modules/debug/src/browser.js +0 -180
- data/node_modules/eslint-plugin-import/node_modules/debug/src/common.js +0 -249
- data/node_modules/eslint-plugin-import/node_modules/debug/src/index.js +0 -12
- data/node_modules/eslint-plugin-import/node_modules/debug/src/node.js +0 -177
- data/node_modules/eslint-plugin-import/node_modules/doctrine/CHANGELOG.md +0 -94
- data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE +0 -177
- data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.closure-compiler +0 -202
- data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.esprima +0 -19
- data/node_modules/eslint-plugin-import/node_modules/doctrine/README.md +0 -165
- data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/doctrine.js +0 -899
- data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/typed.js +0 -1305
- data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/utility.js +0 -35
- data/node_modules/eslint-plugin-import/node_modules/doctrine/package.json +0 -57
- data/node_modules/eslint-plugin-import/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/eslint-plugin-import/node_modules/minimatch/README.md +0 -230
- data/node_modules/eslint-plugin-import/node_modules/minimatch/minimatch.js +0 -947
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/eslint-plugin-import/node_modules/minimatch/package.json +0 -33
- data/node_modules/eslint-plugin-import/node_modules/semver/LICENSE +0 -15
- data/node_modules/eslint-plugin-import/node_modules/semver/README.md +0 -443
- data/node_modules/eslint-plugin-import/node_modules/semver/bin/semver.js +0 -174
- data/node_modules/eslint-plugin-import/node_modules/semver/package.json +0 -38
- data/node_modules/eslint-plugin-import/node_modules/semver/range.bnf +0 -16
- data/node_modules/eslint-plugin-import/node_modules/semver/semver.js +0 -1643
- data/node_modules/eslint-plugin-import/package.json +0 -124
- data/node_modules/function-bind/CHANGELOG.md +0 -136
@@ -1,529 +0,0 @@
|
|
1
|
-
const semver = require('semver');
|
2
|
-
const eslintPkg = require('eslint/package.json');
|
3
|
-
|
4
|
-
module.exports = {
|
5
|
-
rules: {
|
6
|
-
// enforce line breaks after opening and before closing array brackets
|
7
|
-
// https://eslint.org/docs/rules/array-bracket-newline
|
8
|
-
// TODO: enable? semver-major
|
9
|
-
'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 }
|
10
|
-
|
11
|
-
// enforce line breaks between array elements
|
12
|
-
// https://eslint.org/docs/rules/array-element-newline
|
13
|
-
// TODO: enable? semver-major
|
14
|
-
'array-element-newline': ['off', { multiline: true, minItems: 3 }],
|
15
|
-
|
16
|
-
// enforce spacing inside array brackets
|
17
|
-
'array-bracket-spacing': ['error', 'never'],
|
18
|
-
|
19
|
-
// enforce spacing inside single-line blocks
|
20
|
-
// https://eslint.org/docs/rules/block-spacing
|
21
|
-
'block-spacing': ['error', 'always'],
|
22
|
-
|
23
|
-
// enforce one true brace style
|
24
|
-
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
25
|
-
|
26
|
-
// require camel case names
|
27
|
-
camelcase: ['error', { properties: 'never', ignoreDestructuring: false }],
|
28
|
-
|
29
|
-
// enforce or disallow capitalization of the first letter of a comment
|
30
|
-
// https://eslint.org/docs/rules/capitalized-comments
|
31
|
-
'capitalized-comments': ['off', 'never', {
|
32
|
-
line: {
|
33
|
-
ignorePattern: '.*',
|
34
|
-
ignoreInlineComments: true,
|
35
|
-
ignoreConsecutiveComments: true,
|
36
|
-
},
|
37
|
-
block: {
|
38
|
-
ignorePattern: '.*',
|
39
|
-
ignoreInlineComments: true,
|
40
|
-
ignoreConsecutiveComments: true,
|
41
|
-
},
|
42
|
-
}],
|
43
|
-
|
44
|
-
// require trailing commas in multiline object literals
|
45
|
-
'comma-dangle': ['error', {
|
46
|
-
arrays: 'always-multiline',
|
47
|
-
objects: 'always-multiline',
|
48
|
-
imports: 'always-multiline',
|
49
|
-
exports: 'always-multiline',
|
50
|
-
functions: 'always-multiline',
|
51
|
-
}],
|
52
|
-
|
53
|
-
// enforce spacing before and after comma
|
54
|
-
'comma-spacing': ['error', { before: false, after: true }],
|
55
|
-
|
56
|
-
// enforce one true comma style
|
57
|
-
'comma-style': ['error', 'last', {
|
58
|
-
exceptions: {
|
59
|
-
ArrayExpression: false,
|
60
|
-
ArrayPattern: false,
|
61
|
-
ArrowFunctionExpression: false,
|
62
|
-
CallExpression: false,
|
63
|
-
FunctionDeclaration: false,
|
64
|
-
FunctionExpression: false,
|
65
|
-
ImportDeclaration: false,
|
66
|
-
ObjectExpression: false,
|
67
|
-
ObjectPattern: false,
|
68
|
-
VariableDeclaration: false,
|
69
|
-
NewExpression: false,
|
70
|
-
}
|
71
|
-
}],
|
72
|
-
|
73
|
-
// disallow padding inside computed properties
|
74
|
-
'computed-property-spacing': ['error', 'never'],
|
75
|
-
|
76
|
-
// enforces consistent naming when capturing the current execution context
|
77
|
-
'consistent-this': 'off',
|
78
|
-
|
79
|
-
// enforce newline at the end of file, with no multiple empty lines
|
80
|
-
'eol-last': ['error', 'always'],
|
81
|
-
|
82
|
-
// https://eslint.org/docs/rules/function-call-argument-newline
|
83
|
-
'function-call-argument-newline': ['error', 'consistent'],
|
84
|
-
|
85
|
-
// enforce spacing between functions and their invocations
|
86
|
-
// https://eslint.org/docs/rules/func-call-spacing
|
87
|
-
'func-call-spacing': ['error', 'never'],
|
88
|
-
|
89
|
-
// requires function names to match the name of the variable or property to which they are
|
90
|
-
// assigned
|
91
|
-
// https://eslint.org/docs/rules/func-name-matching
|
92
|
-
'func-name-matching': ['off', 'always', {
|
93
|
-
includeCommonJSModuleExports: false,
|
94
|
-
considerPropertyDescriptor: true,
|
95
|
-
}],
|
96
|
-
|
97
|
-
// require function expressions to have a name
|
98
|
-
// https://eslint.org/docs/rules/func-names
|
99
|
-
'func-names': 'warn',
|
100
|
-
|
101
|
-
// enforces use of function declarations or expressions
|
102
|
-
// https://eslint.org/docs/rules/func-style
|
103
|
-
// TODO: enable
|
104
|
-
'func-style': ['off', 'expression'],
|
105
|
-
|
106
|
-
// require line breaks inside function parentheses if there are line breaks between parameters
|
107
|
-
// https://eslint.org/docs/rules/function-paren-newline
|
108
|
-
'function-paren-newline': ['error', semver.satisfies(eslintPkg.version, '>= 6') ? 'multiline-arguments' : 'consistent'],
|
109
|
-
|
110
|
-
// disallow specified identifiers
|
111
|
-
// https://eslint.org/docs/rules/id-denylist
|
112
|
-
'id-denylist': 'off',
|
113
|
-
|
114
|
-
// this option enforces minimum and maximum identifier lengths
|
115
|
-
// (variable names, property names etc.)
|
116
|
-
'id-length': 'off',
|
117
|
-
|
118
|
-
// require identifiers to match the provided regular expression
|
119
|
-
'id-match': 'off',
|
120
|
-
|
121
|
-
// Enforce the location of arrow function bodies with implicit returns
|
122
|
-
// https://eslint.org/docs/rules/implicit-arrow-linebreak
|
123
|
-
'implicit-arrow-linebreak': ['error', 'beside'],
|
124
|
-
|
125
|
-
// this option sets a specific tab width for your code
|
126
|
-
// https://eslint.org/docs/rules/indent
|
127
|
-
indent: ['error', 2, {
|
128
|
-
SwitchCase: 1,
|
129
|
-
VariableDeclarator: 1,
|
130
|
-
outerIIFEBody: 1,
|
131
|
-
// MemberExpression: null,
|
132
|
-
FunctionDeclaration: {
|
133
|
-
parameters: 1,
|
134
|
-
body: 1
|
135
|
-
},
|
136
|
-
FunctionExpression: {
|
137
|
-
parameters: 1,
|
138
|
-
body: 1
|
139
|
-
},
|
140
|
-
CallExpression: {
|
141
|
-
arguments: 1
|
142
|
-
},
|
143
|
-
ArrayExpression: 1,
|
144
|
-
ObjectExpression: 1,
|
145
|
-
ImportDeclaration: 1,
|
146
|
-
flatTernaryExpressions: false,
|
147
|
-
// list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
|
148
|
-
ignoredNodes: ['JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXFragment', 'JSXOpeningFragment', 'JSXClosingFragment', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild'],
|
149
|
-
ignoreComments: false
|
150
|
-
}],
|
151
|
-
|
152
|
-
// specify whether double or single quotes should be used in JSX attributes
|
153
|
-
// https://eslint.org/docs/rules/jsx-quotes
|
154
|
-
'jsx-quotes': ['off', 'prefer-double'],
|
155
|
-
|
156
|
-
// enforces spacing between keys and values in object literal properties
|
157
|
-
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
158
|
-
|
159
|
-
// require a space before & after certain keywords
|
160
|
-
'keyword-spacing': ['error', {
|
161
|
-
before: true,
|
162
|
-
after: true,
|
163
|
-
overrides: {
|
164
|
-
return: { after: true },
|
165
|
-
throw: { after: true },
|
166
|
-
case: { after: true }
|
167
|
-
}
|
168
|
-
}],
|
169
|
-
|
170
|
-
// enforce position of line comments
|
171
|
-
// https://eslint.org/docs/rules/line-comment-position
|
172
|
-
// TODO: enable?
|
173
|
-
'line-comment-position': ['off', {
|
174
|
-
position: 'above',
|
175
|
-
ignorePattern: '',
|
176
|
-
applyDefaultPatterns: true,
|
177
|
-
}],
|
178
|
-
|
179
|
-
// disallow mixed 'LF' and 'CRLF' as linebreaks
|
180
|
-
// https://eslint.org/docs/rules/linebreak-style
|
181
|
-
'linebreak-style': ['error', 'unix'],
|
182
|
-
|
183
|
-
// require or disallow an empty line between class members
|
184
|
-
// https://eslint.org/docs/rules/lines-between-class-members
|
185
|
-
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: false }],
|
186
|
-
|
187
|
-
// enforces empty lines around comments
|
188
|
-
'lines-around-comment': 'off',
|
189
|
-
|
190
|
-
// require or disallow newlines around directives
|
191
|
-
// https://eslint.org/docs/rules/lines-around-directive
|
192
|
-
'lines-around-directive': ['error', {
|
193
|
-
before: 'always',
|
194
|
-
after: 'always',
|
195
|
-
}],
|
196
|
-
|
197
|
-
// specify the maximum depth that blocks can be nested
|
198
|
-
'max-depth': ['off', 4],
|
199
|
-
|
200
|
-
// specify the maximum length of a line in your program
|
201
|
-
// https://eslint.org/docs/rules/max-len
|
202
|
-
'max-len': ['error', 100, 2, {
|
203
|
-
ignoreUrls: true,
|
204
|
-
ignoreComments: false,
|
205
|
-
ignoreRegExpLiterals: true,
|
206
|
-
ignoreStrings: true,
|
207
|
-
ignoreTemplateLiterals: true,
|
208
|
-
}],
|
209
|
-
|
210
|
-
// specify the max number of lines in a file
|
211
|
-
// https://eslint.org/docs/rules/max-lines
|
212
|
-
'max-lines': ['off', {
|
213
|
-
max: 300,
|
214
|
-
skipBlankLines: true,
|
215
|
-
skipComments: true
|
216
|
-
}],
|
217
|
-
|
218
|
-
// enforce a maximum function length
|
219
|
-
// https://eslint.org/docs/rules/max-lines-per-function
|
220
|
-
'max-lines-per-function': ['off', {
|
221
|
-
max: 50,
|
222
|
-
skipBlankLines: true,
|
223
|
-
skipComments: true,
|
224
|
-
IIFEs: true,
|
225
|
-
}],
|
226
|
-
|
227
|
-
// specify the maximum depth callbacks can be nested
|
228
|
-
'max-nested-callbacks': 'off',
|
229
|
-
|
230
|
-
// limits the number of parameters that can be used in the function declaration.
|
231
|
-
'max-params': ['off', 3],
|
232
|
-
|
233
|
-
// specify the maximum number of statement allowed in a function
|
234
|
-
'max-statements': ['off', 10],
|
235
|
-
|
236
|
-
// restrict the number of statements per line
|
237
|
-
// https://eslint.org/docs/rules/max-statements-per-line
|
238
|
-
'max-statements-per-line': ['off', { max: 1 }],
|
239
|
-
|
240
|
-
// enforce a particular style for multiline comments
|
241
|
-
// https://eslint.org/docs/rules/multiline-comment-style
|
242
|
-
'multiline-comment-style': ['off', 'starred-block'],
|
243
|
-
|
244
|
-
// require multiline ternary
|
245
|
-
// https://eslint.org/docs/rules/multiline-ternary
|
246
|
-
// TODO: enable?
|
247
|
-
'multiline-ternary': ['off', 'never'],
|
248
|
-
|
249
|
-
// require a capital letter for constructors
|
250
|
-
'new-cap': ['error', {
|
251
|
-
newIsCap: true,
|
252
|
-
newIsCapExceptions: [],
|
253
|
-
capIsNew: false,
|
254
|
-
capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'],
|
255
|
-
}],
|
256
|
-
|
257
|
-
// disallow the omission of parentheses when invoking a constructor with no arguments
|
258
|
-
// https://eslint.org/docs/rules/new-parens
|
259
|
-
'new-parens': 'error',
|
260
|
-
|
261
|
-
// allow/disallow an empty newline after var statement
|
262
|
-
'newline-after-var': 'off',
|
263
|
-
|
264
|
-
// https://eslint.org/docs/rules/newline-before-return
|
265
|
-
'newline-before-return': 'off',
|
266
|
-
|
267
|
-
// enforces new line after each method call in the chain to make it
|
268
|
-
// more readable and easy to maintain
|
269
|
-
// https://eslint.org/docs/rules/newline-per-chained-call
|
270
|
-
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 4 }],
|
271
|
-
|
272
|
-
// disallow use of the Array constructor
|
273
|
-
'no-array-constructor': 'error',
|
274
|
-
|
275
|
-
// disallow use of bitwise operators
|
276
|
-
// https://eslint.org/docs/rules/no-bitwise
|
277
|
-
'no-bitwise': 'error',
|
278
|
-
|
279
|
-
// disallow use of the continue statement
|
280
|
-
// https://eslint.org/docs/rules/no-continue
|
281
|
-
'no-continue': 'error',
|
282
|
-
|
283
|
-
// disallow comments inline after code
|
284
|
-
'no-inline-comments': 'off',
|
285
|
-
|
286
|
-
// disallow if as the only statement in an else block
|
287
|
-
// https://eslint.org/docs/rules/no-lonely-if
|
288
|
-
'no-lonely-if': 'error',
|
289
|
-
|
290
|
-
// disallow un-paren'd mixes of different operators
|
291
|
-
// https://eslint.org/docs/rules/no-mixed-operators
|
292
|
-
'no-mixed-operators': ['error', {
|
293
|
-
// the list of arithmetic groups disallows mixing `%` and `**`
|
294
|
-
// with other arithmetic operators.
|
295
|
-
groups: [
|
296
|
-
['%', '**'],
|
297
|
-
['%', '+'],
|
298
|
-
['%', '-'],
|
299
|
-
['%', '*'],
|
300
|
-
['%', '/'],
|
301
|
-
['/', '*'],
|
302
|
-
['&', '|', '<<', '>>', '>>>'],
|
303
|
-
['==', '!=', '===', '!=='],
|
304
|
-
['&&', '||'],
|
305
|
-
],
|
306
|
-
allowSamePrecedence: false
|
307
|
-
}],
|
308
|
-
|
309
|
-
// disallow mixed spaces and tabs for indentation
|
310
|
-
'no-mixed-spaces-and-tabs': 'error',
|
311
|
-
|
312
|
-
// disallow use of chained assignment expressions
|
313
|
-
// https://eslint.org/docs/rules/no-multi-assign
|
314
|
-
'no-multi-assign': ['error'],
|
315
|
-
|
316
|
-
// disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
|
317
|
-
// https://eslint.org/docs/rules/no-multiple-empty-lines
|
318
|
-
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }],
|
319
|
-
|
320
|
-
// disallow negated conditions
|
321
|
-
// https://eslint.org/docs/rules/no-negated-condition
|
322
|
-
'no-negated-condition': 'off',
|
323
|
-
|
324
|
-
// disallow nested ternary expressions
|
325
|
-
'no-nested-ternary': 'error',
|
326
|
-
|
327
|
-
// disallow use of the Object constructor
|
328
|
-
'no-new-object': 'error',
|
329
|
-
|
330
|
-
// disallow use of unary operators, ++ and --
|
331
|
-
// https://eslint.org/docs/rules/no-plusplus
|
332
|
-
'no-plusplus': 'error',
|
333
|
-
|
334
|
-
// disallow certain syntax forms
|
335
|
-
// https://eslint.org/docs/rules/no-restricted-syntax
|
336
|
-
'no-restricted-syntax': [
|
337
|
-
'error',
|
338
|
-
{
|
339
|
-
selector: 'ForInStatement',
|
340
|
-
message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
|
341
|
-
},
|
342
|
-
{
|
343
|
-
selector: 'ForOfStatement',
|
344
|
-
message: 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.',
|
345
|
-
},
|
346
|
-
{
|
347
|
-
selector: 'LabeledStatement',
|
348
|
-
message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
|
349
|
-
},
|
350
|
-
{
|
351
|
-
selector: 'WithStatement',
|
352
|
-
message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
|
353
|
-
},
|
354
|
-
],
|
355
|
-
|
356
|
-
// disallow space between function identifier and application
|
357
|
-
'no-spaced-func': 'error',
|
358
|
-
|
359
|
-
// disallow tab characters entirely
|
360
|
-
'no-tabs': 'error',
|
361
|
-
|
362
|
-
// disallow the use of ternary operators
|
363
|
-
'no-ternary': 'off',
|
364
|
-
|
365
|
-
// disallow trailing whitespace at the end of lines
|
366
|
-
'no-trailing-spaces': ['error', {
|
367
|
-
skipBlankLines: false,
|
368
|
-
ignoreComments: false,
|
369
|
-
}],
|
370
|
-
|
371
|
-
// disallow dangling underscores in identifiers
|
372
|
-
// https://eslint.org/docs/rules/no-underscore-dangle
|
373
|
-
'no-underscore-dangle': ['error', {
|
374
|
-
allow: [],
|
375
|
-
allowAfterThis: false,
|
376
|
-
allowAfterSuper: false,
|
377
|
-
enforceInMethodNames: true,
|
378
|
-
}],
|
379
|
-
|
380
|
-
// disallow the use of Boolean literals in conditional expressions
|
381
|
-
// also, prefer `a || b` over `a ? a : b`
|
382
|
-
// https://eslint.org/docs/rules/no-unneeded-ternary
|
383
|
-
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
384
|
-
|
385
|
-
// disallow whitespace before properties
|
386
|
-
// https://eslint.org/docs/rules/no-whitespace-before-property
|
387
|
-
'no-whitespace-before-property': 'error',
|
388
|
-
|
389
|
-
// enforce the location of single-line statements
|
390
|
-
// https://eslint.org/docs/rules/nonblock-statement-body-position
|
391
|
-
'nonblock-statement-body-position': ['error', 'beside', { overrides: {} }],
|
392
|
-
|
393
|
-
// require padding inside curly braces
|
394
|
-
'object-curly-spacing': ['error', 'always'],
|
395
|
-
|
396
|
-
// enforce line breaks between braces
|
397
|
-
// https://eslint.org/docs/rules/object-curly-newline
|
398
|
-
'object-curly-newline': ['error', {
|
399
|
-
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
|
400
|
-
ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
|
401
|
-
ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },
|
402
|
-
ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },
|
403
|
-
}],
|
404
|
-
|
405
|
-
// enforce "same line" or "multiple line" on object properties.
|
406
|
-
// https://eslint.org/docs/rules/object-property-newline
|
407
|
-
'object-property-newline': ['error', {
|
408
|
-
allowAllPropertiesOnSameLine: true,
|
409
|
-
}],
|
410
|
-
|
411
|
-
// allow just one var statement per function
|
412
|
-
'one-var': ['error', 'never'],
|
413
|
-
|
414
|
-
// require a newline around variable declaration
|
415
|
-
// https://eslint.org/docs/rules/one-var-declaration-per-line
|
416
|
-
'one-var-declaration-per-line': ['error', 'always'],
|
417
|
-
|
418
|
-
// require assignment operator shorthand where possible or prohibit it entirely
|
419
|
-
// https://eslint.org/docs/rules/operator-assignment
|
420
|
-
'operator-assignment': ['error', 'always'],
|
421
|
-
|
422
|
-
// Requires operator at the beginning of the line in multiline statements
|
423
|
-
// https://eslint.org/docs/rules/operator-linebreak
|
424
|
-
'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }],
|
425
|
-
|
426
|
-
// disallow padding within blocks
|
427
|
-
'padded-blocks': ['error', {
|
428
|
-
blocks: 'never',
|
429
|
-
classes: 'never',
|
430
|
-
switches: 'never',
|
431
|
-
}, {
|
432
|
-
allowSingleLineBlocks: true,
|
433
|
-
}],
|
434
|
-
|
435
|
-
// Require or disallow padding lines between statements
|
436
|
-
// https://eslint.org/docs/rules/padding-line-between-statements
|
437
|
-
'padding-line-between-statements': 'off',
|
438
|
-
|
439
|
-
// Disallow the use of Math.pow in favor of the ** operator
|
440
|
-
// https://eslint.org/docs/rules/prefer-exponentiation-operator
|
441
|
-
'prefer-exponentiation-operator': 'error',
|
442
|
-
|
443
|
-
// Prefer use of an object spread over Object.assign
|
444
|
-
// https://eslint.org/docs/rules/prefer-object-spread
|
445
|
-
'prefer-object-spread': 'error',
|
446
|
-
|
447
|
-
// require quotes around object literal property names
|
448
|
-
// https://eslint.org/docs/rules/quote-props.html
|
449
|
-
'quote-props': ['error', 'as-needed', { keywords: false, unnecessary: true, numbers: false }],
|
450
|
-
|
451
|
-
// specify whether double or single quotes should be used
|
452
|
-
quotes: ['error', 'single', { avoidEscape: true }],
|
453
|
-
|
454
|
-
// do not require jsdoc
|
455
|
-
// https://eslint.org/docs/rules/require-jsdoc
|
456
|
-
'require-jsdoc': 'off',
|
457
|
-
|
458
|
-
// require or disallow use of semicolons instead of ASI
|
459
|
-
semi: ['error', 'always'],
|
460
|
-
|
461
|
-
// enforce spacing before and after semicolons
|
462
|
-
'semi-spacing': ['error', { before: false, after: true }],
|
463
|
-
|
464
|
-
// Enforce location of semicolons
|
465
|
-
// https://eslint.org/docs/rules/semi-style
|
466
|
-
'semi-style': ['error', 'last'],
|
467
|
-
|
468
|
-
// requires object keys to be sorted
|
469
|
-
'sort-keys': ['off', 'asc', { caseSensitive: false, natural: true }],
|
470
|
-
|
471
|
-
// sort variables within the same declaration block
|
472
|
-
'sort-vars': 'off',
|
473
|
-
|
474
|
-
// require or disallow space before blocks
|
475
|
-
'space-before-blocks': 'error',
|
476
|
-
|
477
|
-
// require or disallow space before function opening parenthesis
|
478
|
-
// https://eslint.org/docs/rules/space-before-function-paren
|
479
|
-
'space-before-function-paren': ['error', {
|
480
|
-
anonymous: 'always',
|
481
|
-
named: 'never',
|
482
|
-
asyncArrow: 'always'
|
483
|
-
}],
|
484
|
-
|
485
|
-
// require or disallow spaces inside parentheses
|
486
|
-
'space-in-parens': ['error', 'never'],
|
487
|
-
|
488
|
-
// require spaces around operators
|
489
|
-
'space-infix-ops': 'error',
|
490
|
-
|
491
|
-
// Require or disallow spaces before/after unary operators
|
492
|
-
// https://eslint.org/docs/rules/space-unary-ops
|
493
|
-
'space-unary-ops': ['error', {
|
494
|
-
words: true,
|
495
|
-
nonwords: false,
|
496
|
-
overrides: {
|
497
|
-
},
|
498
|
-
}],
|
499
|
-
|
500
|
-
// require or disallow a space immediately following the // or /* in a comment
|
501
|
-
// https://eslint.org/docs/rules/spaced-comment
|
502
|
-
'spaced-comment': ['error', 'always', {
|
503
|
-
line: {
|
504
|
-
exceptions: ['-', '+'],
|
505
|
-
markers: ['=', '!', '/'], // space here to support sprockets directives, slash for TS /// comments
|
506
|
-
},
|
507
|
-
block: {
|
508
|
-
exceptions: ['-', '+'],
|
509
|
-
markers: ['=', '!', ':', '::'], // space here to support sprockets directives and flow comment types
|
510
|
-
balanced: true,
|
511
|
-
}
|
512
|
-
}],
|
513
|
-
|
514
|
-
// Enforce spacing around colons of switch statements
|
515
|
-
// https://eslint.org/docs/rules/switch-colon-spacing
|
516
|
-
'switch-colon-spacing': ['error', { after: true, before: false }],
|
517
|
-
|
518
|
-
// Require or disallow spacing between template tags and their literals
|
519
|
-
// https://eslint.org/docs/rules/template-tag-spacing
|
520
|
-
'template-tag-spacing': ['error', 'never'],
|
521
|
-
|
522
|
-
// require or disallow the Unicode Byte Order Mark
|
523
|
-
// https://eslint.org/docs/rules/unicode-bom
|
524
|
-
'unicode-bom': ['error', 'never'],
|
525
|
-
|
526
|
-
// require regex literals to be wrapped in parentheses
|
527
|
-
'wrap-regex': 'off'
|
528
|
-
}
|
529
|
-
};
|
@@ -1,56 +0,0 @@
|
|
1
|
-
const confusingBrowserGlobals = require('confusing-browser-globals');
|
2
|
-
|
3
|
-
module.exports = {
|
4
|
-
rules: {
|
5
|
-
// enforce or disallow variable initializations at definition
|
6
|
-
'init-declarations': 'off',
|
7
|
-
|
8
|
-
// disallow the catch clause parameter name being the same as a variable in the outer scope
|
9
|
-
'no-catch-shadow': 'off',
|
10
|
-
|
11
|
-
// disallow deletion of variables
|
12
|
-
'no-delete-var': 'error',
|
13
|
-
|
14
|
-
// disallow labels that share a name with a variable
|
15
|
-
// https://eslint.org/docs/rules/no-label-var
|
16
|
-
'no-label-var': 'error',
|
17
|
-
|
18
|
-
// disallow specific globals
|
19
|
-
'no-restricted-globals': [
|
20
|
-
'error',
|
21
|
-
{
|
22
|
-
name: 'isFinite',
|
23
|
-
message:
|
24
|
-
'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite',
|
25
|
-
},
|
26
|
-
{
|
27
|
-
name: 'isNaN',
|
28
|
-
message:
|
29
|
-
'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
|
30
|
-
},
|
31
|
-
].concat(confusingBrowserGlobals),
|
32
|
-
|
33
|
-
// disallow declaration of variables already declared in the outer scope
|
34
|
-
'no-shadow': 'error',
|
35
|
-
|
36
|
-
// disallow shadowing of names such as arguments
|
37
|
-
'no-shadow-restricted-names': 'error',
|
38
|
-
|
39
|
-
// disallow use of undeclared variables unless mentioned in a /*global */ block
|
40
|
-
'no-undef': 'error',
|
41
|
-
|
42
|
-
// disallow use of undefined when initializing variables
|
43
|
-
'no-undef-init': 'error',
|
44
|
-
|
45
|
-
// disallow use of undefined variable
|
46
|
-
// https://eslint.org/docs/rules/no-undefined
|
47
|
-
// TODO: enable?
|
48
|
-
'no-undefined': 'off',
|
49
|
-
|
50
|
-
// disallow declaration of variables that are not used in the code
|
51
|
-
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }],
|
52
|
-
|
53
|
-
// disallow use of variables before they are defined
|
54
|
-
'no-use-before-define': ['error', { functions: true, classes: true, variables: true }],
|
55
|
-
}
|
56
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/* eslint strict: 0, global-require: 0 */
|
2
|
-
|
3
|
-
'use strict';
|
4
|
-
|
5
|
-
const test = require('tape');
|
6
|
-
|
7
|
-
test('all entry points parse', (t) => {
|
8
|
-
t.doesNotThrow(() => require('..'), 'index does not throw');
|
9
|
-
t.doesNotThrow(() => require('../legacy'), 'legacy does not throw');
|
10
|
-
t.doesNotThrow(() => require('../whitespace'), 'whitespace does not throw');
|
11
|
-
|
12
|
-
t.end();
|
13
|
-
});
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import fs from 'fs';
|
2
|
-
import path from 'path';
|
3
|
-
import test from 'tape';
|
4
|
-
|
5
|
-
import index from '..';
|
6
|
-
|
7
|
-
const files = { ...{ index } }; // object spread is to test parsing
|
8
|
-
|
9
|
-
fs.readdirSync(path.join(__dirname, '../rules')).forEach((name) => {
|
10
|
-
// eslint-disable-next-line import/no-dynamic-require
|
11
|
-
files[name] = require(`../rules/${name}`); // eslint-disable-line global-require
|
12
|
-
});
|
13
|
-
|
14
|
-
Object.keys(files).forEach((
|
15
|
-
name, // trailing function comma is to test parsing
|
16
|
-
) => {
|
17
|
-
const config = files[name];
|
18
|
-
|
19
|
-
test(`${name}: does not reference react`, (t) => {
|
20
|
-
t.plan(2);
|
21
|
-
|
22
|
-
// scan plugins for react and fail if it is found
|
23
|
-
const hasReactPlugin = Object.prototype.hasOwnProperty.call(config, 'plugins')
|
24
|
-
&& config.plugins.indexOf('react') !== -1;
|
25
|
-
t.notOk(hasReactPlugin, 'there is no react plugin');
|
26
|
-
|
27
|
-
// scan rules for react/ and fail if any exist
|
28
|
-
const reactRuleIds = Object.keys(config.rules)
|
29
|
-
.filter((ruleId) => ruleId.indexOf('react/') === 0);
|
30
|
-
t.deepEquals(reactRuleIds, [], 'there are no react/ rules');
|
31
|
-
});
|
32
|
-
});
|