Skip to content

Commit aa17e43

Browse files
authored
Merge branch 'main' into patch-1
2 parents 6564860 + c77c1a6 commit aa17e43

File tree

201 files changed

+4996
-3336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+4996
-3336
lines changed

.eslintrc

+142-26
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,67 @@
1212
"env": {
1313
"node": true,
1414
"es6": true,
15+
"es2017": true,
1516
},
1617
"parserOptions": {
1718
"sourceType": "module",
1819
"ecmaVersion": 2020,
1920
},
2021
"rules": {
22+
"array-bracket-spacing": [2, "never"],
23+
"arrow-body-style": [2, "as-needed"],
24+
"arrow-parens": [2, "always"],
25+
"arrow-spacing": [2, { "before": true, "after": true }],
26+
"block-spacing": [2, "always"],
27+
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
2128
"comma-dangle": ["error", {
2229
"arrays": "always-multiline",
2330
"objects": "always-multiline",
2431
"imports": "always-multiline",
2532
"exports": "always-multiline",
2633
"functions": "always-multiline",
2734
}],
35+
"comma-spacing": [2, { "before": false, "after": true }],
2836
"comma-style": [2, "last"],
29-
"curly": [2, "multi-line"],
37+
"computed-property-spacing": [2, "never"],
38+
"curly": [2, "all"],
39+
"default-case": [2, { "commentPattern": "(?:)" }],
40+
"default-case-last": [2],
41+
"default-param-last": [2],
42+
"dot-location": [2, "property"],
43+
"dot-notation": [2, { "allowKeywords": true, "allowPattern": "throws" }],
3044
"eol-last": [2, "always"],
3145
"eqeqeq": [2, "allow-null"],
32-
"func-call-spacing": 2,
33-
"indent": [2, 2],
46+
"for-direction": [2],
47+
"function-call-argument-newline": [2, "consistent"],
48+
"func-call-spacing": [2, "never"],
49+
"implicit-arrow-linebreak": [2, "beside"],
50+
"indent": [2, 2, {
51+
"SwitchCase": 1,
52+
"VariableDeclarator": 1,
53+
"outerIIFEBody": 1,
54+
"FunctionDeclaration": {
55+
"parameters": 1,
56+
"body": 1
57+
},
58+
"FunctionExpression": {
59+
"parameters": 1,
60+
"body": 1
61+
},
62+
"CallExpression": {
63+
"arguments": 1
64+
},
65+
"ArrayExpression": 1,
66+
"ObjectExpression": 1,
67+
"ImportDeclaration": 1,
68+
"flatTernaryExpressions": false,
69+
}],
70+
"jsx-quotes": [2, "prefer-double"],
71+
"key-spacing": [2, {
72+
"beforeColon": false,
73+
"afterColon": true,
74+
"mode": "strict",
75+
}],
3476
"keyword-spacing": ["error", {
3577
"before": true,
3678
"after": true,
@@ -40,27 +82,69 @@
4082
"case": { "after": true }
4183
}
4284
}],
85+
"linebreak-style": [2, "unix"],
86+
"lines-around-directive": [2, {
87+
"before": "always",
88+
"after": "always",
89+
}],
4390
"max-len": 0,
91+
"new-parens": 2,
92+
"no-array-constructor": 2,
93+
"no-compare-neg-zero": 2,
4494
"no-cond-assign": [2, "always"],
95+
"no-extra-parens": 2,
96+
"no-multiple-empty-lines": [2, { "max": 1, "maxEOF": 1, "maxBOF": 0 }],
4597
"no-return-assign": [2, "always"],
98+
"no-trailing-spaces": 2,
99+
"no-use-before-define": [2, { "functions": true, "classes": true, "variables": true }],
46100
"no-var": 2,
47101
"object-curly-spacing": [2, "always"],
48102
"object-shorthand": ["error", "always", {
49103
"ignoreConstructors": false,
50-
"avoidQuotes": true,
104+
"avoidQuotes": false,
105+
"avoidExplicitReturnArrows": true,
51106
}],
52107
"one-var": [2, "never"],
108+
"operator-linebreak": [2, "none", {
109+
"overrides": {
110+
"?": "before",
111+
":": "before",
112+
"&&": "before",
113+
"||": "before",
114+
},
115+
}],
53116
"prefer-const": 2,
117+
"prefer-object-spread": 2,
118+
"prefer-rest-params": 2,
119+
"prefer-template": 2,
120+
"quote-props": [2, "as-needed", { "keywords": false }],
54121
"quotes": [2, "single", {
55122
"allowTemplateLiterals": true,
56123
"avoidEscape": true,
57124
}],
125+
"rest-spread-spacing": [2, "never"],
58126
"semi": [2, "always"],
127+
"semi-spacing": [2, { "before": false, "after": true }],
128+
"semi-style": [2, "last"],
129+
"space-before-blocks": [2, { "functions": "always", "keywords": "always", "classes": "always" }],
59130
"space-before-function-paren": ["error", {
60131
"anonymous": "always",
61132
"named": "never",
62133
"asyncArrow": "always",
63134
}],
135+
"space-in-parens": [2, "never"],
136+
"space-infix-ops": [2],
137+
"space-unary-ops": [2, { "words": true, "nonwords": false }],
138+
"switch-colon-spacing": [2, { "after": true, "before": false }],
139+
"template-curly-spacing": [2, "never"],
140+
"template-tag-spacing": [2, "never"],
141+
"unicode-bom": [2, "never"],
142+
"use-isnan": [2, { "enforceForSwitchCase": true }],
143+
"valid-typeof": [2],
144+
"wrap-iife": [2, "outside", { "functionPrototypeMethods": true }],
145+
"wrap-regex": [2],
146+
"yield-star-spacing": [2, { "before": false, "after": true }],
147+
"yoda": [2, "never", { "exceptRange": true, "onlyEquality": false }],
64148

65149
"eslint-plugin/consistent-output": [
66150
"error",
@@ -76,7 +160,16 @@
76160
"eslint-plugin/require-meta-type": "error",
77161

78162
// dog fooding
79-
"import/no-extraneous-dependencies": "error",
163+
"import/no-extraneous-dependencies": ["error", {
164+
"devDependencies": [
165+
"tests/**",
166+
"resolvers/*/test/**",
167+
"scripts/**"
168+
],
169+
"optionalDependencies": false,
170+
"peerDependencies": true,
171+
"bundledDependencies": false,
172+
}],
80173
"import/unambiguous": "off",
81174
},
82175

@@ -98,19 +191,58 @@
98191
},
99192
},
100193
{
101-
"files": "resolvers/**",
194+
"files": [
195+
"resolvers/**",
196+
"utils/**",
197+
],
102198
"env": {
103199
"es6": false,
104200
},
201+
"parserOptions": {
202+
"sourceType": "module",
203+
"ecmaVersion": 2016,
204+
},
205+
"rules": {
206+
"comma-dangle": ["error", {
207+
"arrays": "always-multiline",
208+
"objects": "always-multiline",
209+
"imports": "always-multiline",
210+
"exports": "always-multiline",
211+
"functions": "never"
212+
}],
213+
"prefer-destructuring": "off",
214+
"prefer-object-spread": "off",
215+
"prefer-rest-params": "off",
216+
"prefer-spread": "off",
217+
"prefer-template": "off",
218+
}
105219
},
106220
{
107-
"files": "resolvers/webpack/**",
221+
"files": [
222+
"resolvers/webpack/**",
223+
"utils/**",
224+
],
108225
"rules": {
109-
"import/no-extraneous-dependencies": 1,
110226
"no-console": 1,
111227
},
112-
"env": {
113-
"es6": true,
228+
},
229+
{
230+
"files": [
231+
"utils/**", // TODO
232+
"src/ExportMap.js", // TODO
233+
],
234+
"rules": {
235+
"no-use-before-define": "off",
236+
},
237+
},
238+
{
239+
"files": [
240+
"resolvers/webpack/index.js",
241+
"resolvers/webpack/test/example.js",
242+
"utils/parse.js",
243+
],
244+
"rules": {
245+
"no-console": "off",
114246
},
115247
},
116248
{
@@ -122,22 +254,6 @@
122254
"es6": false
123255
},
124256
},
125-
{
126-
"files": "utils/**",
127-
"parserOptions": {
128-
"ecmaVersion": 6,
129-
},
130-
"rules": {
131-
"comma-dangle": ["error", {
132-
"arrays": "always-multiline",
133-
"objects": "always-multiline",
134-
"imports": "always-multiline",
135-
"exports": "always-multiline",
136-
"functions": "never"
137-
}],
138-
"no-console": 1,
139-
},
140-
},
141257
{
142258
"files": "tests/**",
143259
"env": {

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@ resolvers/node/LICENSE
2525
resolvers/webpack/LICENSE
2626
utils/LICENSE
2727
memo-parser/.npmrc
28-
memo-parser/.nycrc
2928
resolvers/node/.npmrc
30-
resolvers/node/.nycrc
3129
resolvers/webpack/.npmrc
32-
resolvers/webpack/.nycrc
3330
utils/.npmrc
34-
utils/.nycrc
3531

3632
# Dependency directory
3733
# Commenting this out is preferred by some people, see

.markdownlint.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"line-length": false,
3+
"ul-indent": {
4+
"start_indent": 1,
5+
"start_indented": true
6+
},
7+
"ul-style": {
8+
"style": "dash"
9+
}
10+
}

.markdownlintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CHANGELOG.md
2+
node_modules

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ matrix:
2525
fast_finish: true
2626

2727
before_install:
28-
- 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash && . $NVM_DIR/nvm.sh'
2928
- 'nvm install-latest-npm'
3029
- 'NPM_CONFIG_LEGACY_PEER_DEPS=true npm install'
3130
- 'npm run copy-metafiles'

0 commit comments

Comments
 (0)