Skip to content

Commit 975ab31

Browse files
committed
chore: fresh
Signed-off-by: Charlike Mike Reagent <[email protected]>
1 parent 3a291ce commit 975ab31

File tree

85 files changed

+8636
-0
lines changed

Some content is hidden

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

85 files changed

+8636
-0
lines changed

.all-contributorsrc

+184
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
{
2+
"projectName": "node-formidable",
3+
"projectOwner": "node-formidable",
4+
"repoType": "github",
5+
"repoHost": "https://github.com",
6+
"imageSize": 100,
7+
"contributorsPerLine": 6,
8+
"commitConvention": "angular",
9+
"commit": true,
10+
"skipCi": true,
11+
"files": [
12+
"README.md"
13+
],
14+
"contributors": [
15+
{
16+
"login": "felixge",
17+
"name": "Felix Geisendörfer",
18+
"avatar_url": "https://avatars3.githubusercontent.com/u/15000?s=460&v=4",
19+
"profile": "https://twitter.com/felixge",
20+
"contributions": [
21+
"code",
22+
"design",
23+
"ideas",
24+
"doc"
25+
]
26+
},
27+
{
28+
"login": "tunnckoCore",
29+
"name": "Charlike Mike Reagent",
30+
"avatar_url": "https://avatars3.githubusercontent.com/u/5038030?v=4",
31+
"profile": "https://tunnckoCore.com",
32+
"contributions": [
33+
"bug",
34+
"infra",
35+
"design",
36+
"code",
37+
"doc",
38+
"example",
39+
"ideas",
40+
"maintenance",
41+
"test"
42+
]
43+
},
44+
{
45+
"login": "kedarv",
46+
"name": "Kedar",
47+
"avatar_url": "https://avatars1.githubusercontent.com/u/1365665?v=4",
48+
"profile": "https://github.com/kedarv",
49+
"contributions": [
50+
"code",
51+
"test",
52+
"question",
53+
"bug"
54+
]
55+
},
56+
{
57+
"login": "GrosSacASac",
58+
"name": "Walle Cyril",
59+
"avatar_url": "https://avatars0.githubusercontent.com/u/5721194?v=4",
60+
"profile": "https://github.com/GrosSacASac",
61+
"contributions": [
62+
"question",
63+
"bug",
64+
"code",
65+
"financial",
66+
"ideas",
67+
"maintenance"
68+
]
69+
},
70+
{
71+
"login": "xarguments",
72+
"name": "Xargs",
73+
"avatar_url": "https://avatars2.githubusercontent.com/u/40522463?v=4",
74+
"profile": "https://github.com/xarguments",
75+
"contributions": [
76+
"question",
77+
"bug",
78+
"code",
79+
"maintenance"
80+
]
81+
},
82+
{
83+
"login": "Amit-A",
84+
"name": "Amit-A",
85+
"avatar_url": "https://avatars1.githubusercontent.com/u/7987238?v=4",
86+
"profile": "https://github.com/Amit-A",
87+
"contributions": [
88+
"question",
89+
"bug",
90+
"code"
91+
]
92+
},
93+
{
94+
"login": "charmander",
95+
"name": "Charmander",
96+
"avatar_url": "https://avatars1.githubusercontent.com/u/1889843?v=4",
97+
"profile": "https://charmander.me/",
98+
"contributions": [
99+
"question",
100+
"bug",
101+
"code",
102+
"ideas",
103+
"maintenance"
104+
]
105+
},
106+
{
107+
"login": "DylanPiercey",
108+
"name": "Dylan Piercey",
109+
"avatar_url": "https://avatars2.githubusercontent.com/u/4985201?v=4",
110+
"profile": "https://twitter.com/dylan_piercey",
111+
"contributions": [
112+
"ideas"
113+
]
114+
},
115+
{
116+
"login": "ad-m",
117+
"name": "Adam Dobrawy",
118+
"avatar_url": "https://avatars1.githubusercontent.com/u/3618479?v=4",
119+
"profile": "http://ochrona.jawne.info.pl",
120+
"contributions": [
121+
"bug",
122+
"doc"
123+
]
124+
},
125+
{
126+
"login": "amitrohatgi",
127+
"name": "amitrohatgi",
128+
"avatar_url": "https://avatars3.githubusercontent.com/u/12177021?v=4",
129+
"profile": "https://github.com/amitrohatgi",
130+
"contributions": [
131+
"ideas"
132+
]
133+
},
134+
{
135+
"login": "fengxinming",
136+
"name": "Jesse Feng",
137+
"avatar_url": "https://avatars2.githubusercontent.com/u/6262382?v=4",
138+
"profile": "https://github.com/fengxinming",
139+
"contributions": [
140+
"bug"
141+
]
142+
},
143+
{
144+
"login": "quantumsheep",
145+
"name": "Nathanael Demacon",
146+
"avatar_url": "https://avatars1.githubusercontent.com/u/7271496?v=4",
147+
"profile": "https://qtmsheep.com",
148+
"contributions": [
149+
"question",
150+
"code",
151+
"review"
152+
]
153+
},
154+
{
155+
"login": "MunMunMiao",
156+
"name": "MunMunMiao",
157+
"avatar_url": "https://avatars1.githubusercontent.com/u/18216142?v=4",
158+
"profile": "https://github.com/MunMunMiao",
159+
"contributions": [
160+
"bug"
161+
]
162+
},
163+
{
164+
"login": "gabipetrovay",
165+
"name": "Gabriel Petrovay",
166+
"avatar_url": "https://avatars0.githubusercontent.com/u/1170398?v=4",
167+
"profile": "https://github.com/gabipetrovay",
168+
"contributions": [
169+
"bug",
170+
"code"
171+
]
172+
},
173+
{
174+
"login": "Elzair",
175+
"name": "Philip Woods",
176+
"avatar_url": "https://avatars0.githubusercontent.com/u/2352818?v=4",
177+
"profile": "https://github.com/Elzair",
178+
"contributions": [
179+
"code",
180+
"ideas"
181+
]
182+
}
183+
]
184+
}

.eslintignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Ignore everything!
2+
*
3+
4+
# de-ignores: add here what you want to be committed
5+
!*.mjs
6+
!*.cjs
7+
!*.js*
8+
!*.ts*
9+
!*.md*
10+
11+
!**/src
12+
!**/src/**
13+
14+
!**/test
15+
!**/test/**
16+
17+
!**/*tests*
18+
!**/*tests*/**
19+
20+
!**/benchmark*
21+
!**/benchmark*/**
22+
23+
!**/example*
24+
!**/example*/**
25+
26+
# re-ignores: add here what you want to be ignored again
27+
test/tmp

.eslintrc.js

+176
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
'use strict';
2+
3+
const airbnbBase = require('eslint-config-airbnb-base');
4+
5+
// eslint-disable-next-line import/no-dynamic-require
6+
const bestPractices = require(airbnbBase.extends[0]);
7+
8+
const ignoredProps = bestPractices.rules[
9+
'no-param-reassign'
10+
][1].ignorePropertyModificationsFor.concat(
11+
'err',
12+
'x',
13+
'_',
14+
'opts',
15+
'options',
16+
'settings',
17+
'config',
18+
'cfg',
19+
);
20+
21+
// Additional rules that are specific and overiding previous
22+
const additionalChanges = {
23+
strict: 'off',
24+
25+
// Enforce using named functions when regular function is used,
26+
// otherwise use arrow functions
27+
'func-names': ['error', 'always'],
28+
// Always use parens (for consistency).
29+
// https://eslint.org/docs/rules/arrow-parens
30+
'arrow-parens': ['error', 'always', { requireForBlockBody: true }],
31+
'prefer-arrow-callback': [
32+
'error',
33+
{ allowNamedFunctions: true, allowUnboundThis: true },
34+
],
35+
// http://eslint.org/docs/rules/max-params
36+
'max-params': ['error', { max: 3 }],
37+
// http://eslint.org/docs/rules/max-statements
38+
'max-statements': ['error', { max: 20 }],
39+
// http://eslint.org/docs/rules/max-statements-per-line
40+
'max-statements-per-line': ['error', { max: 1 }],
41+
// http://eslint.org/docs/rules/max-nested-callbacks
42+
'max-nested-callbacks': ['error', { max: 4 }],
43+
// http://eslint.org/docs/rules/max-depth
44+
'max-depth': ['error', { max: 4 }],
45+
// enforces no braces where they can be omitted
46+
// https://eslint.org/docs/rules/arrow-body-style
47+
// Never enable for object literal.
48+
'arrow-body-style': [
49+
'error',
50+
'as-needed',
51+
{ requireReturnForObjectLiteral: false },
52+
],
53+
// Allow functions to be use before define because:
54+
// 1) they are hoisted,
55+
// 2) because ensure read flow is from top to bottom
56+
// 3) logically order of the code.
57+
// 4) the only addition is 'typedefs' option, see overrides for TS files
58+
'no-use-before-define': [
59+
'error',
60+
{
61+
functions: false,
62+
classes: true,
63+
variables: true,
64+
},
65+
],
66+
// Same as AirBnB, but adds `opts`, `options`, `x` and `err` to exclusions!
67+
// disallow reassignment of function parameters
68+
// disallow parameter object manipulation except for specific exclusions
69+
// rule: https://eslint.org/docs/rules/no-param-reassign.html
70+
'no-param-reassign': [
71+
'error',
72+
{
73+
props: true,
74+
ignorePropertyModificationsFor: ignoredProps,
75+
},
76+
],
77+
78+
// disallow declaration of variables that are not used in the code
79+
'no-unused-vars': [
80+
'error',
81+
{
82+
ignoreRestSiblings: true, // airbnb's default
83+
vars: 'all', // airbnb's default
84+
varsIgnorePattern: '^(?:$$|xx|_|__|[iI]gnor(?:e|ing|ed))',
85+
args: 'after-used', // airbnb's default
86+
argsIgnorePattern: '^(?:$$|xx|_|__|[iI]gnor(?:e|ing|ed))',
87+
88+
// catch blocks are handled by Unicorns
89+
caughtErrors: 'none',
90+
// caughtErrorsIgnorePattern: '^(?:$$|xx|_|__|[iI]gnor(?:e|ing|ed))',
91+
},
92+
],
93+
};
94+
95+
const importRules = {
96+
'import/namespace': ['error', { allowComputed: true }],
97+
'import/no-absolute-path': 'error',
98+
'import/no-webpack-loader-syntax': 'error',
99+
'import/no-self-import': 'error',
100+
101+
// Enable this sometime in the future when Node.js has ES2015 module support
102+
// 'import/no-cycle': 'error',
103+
104+
// Disabled as it doesn't work with TypeScript
105+
// 'import/newline-after-import': 'error',
106+
107+
'import/no-amd': 'error',
108+
'import/no-duplicates': 'error',
109+
110+
// Enable this sometime in the future when Node.js has ES2015 module support
111+
// 'import/unambiguous': 'error',
112+
113+
// Enable this sometime in the future when Node.js has ES2015 module support
114+
// 'import/no-commonjs': 'error',
115+
116+
// Looks useful, but too unstable at the moment
117+
// 'import/no-deprecated': 'error',
118+
119+
'import/no-extraneous-dependencies': 'off',
120+
'import/no-mutable-exports': 'error',
121+
'import/no-named-as-default-member': 'error',
122+
'import/no-named-as-default': 'error',
123+
124+
// Disabled because it's buggy and it also doesn't work with TypeScript
125+
// 'import/no-unresolved': [
126+
// 'error',
127+
// {
128+
// commonjs: true
129+
// }
130+
// ],
131+
132+
'import/order': 'error',
133+
'import/no-unassigned-import': [
134+
'error',
135+
{ allow: ['@babel/polyfill', '@babel/register'] },
136+
],
137+
138+
'import/prefer-default-export': 'off',
139+
140+
// Ensure more web-compat
141+
// ! note that it doesn't work in CommonJS
142+
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
143+
'import/extensions': 'off',
144+
145+
// ? Always use named exports. Enable?
146+
// 'import/no-default-export': 'error',
147+
148+
// ? enable?
149+
'import/exports-last': 'off',
150+
151+
// todo: Enable in future.
152+
// Ensures everything is tested (all exports should be used).
153+
// For cases when you don't want or can't test, add eslint-ignore comment!
154+
// see: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unused-modules.md
155+
'import/no-unused-modules': 'off',
156+
157+
'import/no-useless-path-segments': ['error', { noUselessIndex: false }],
158+
};
159+
160+
module.exports = {
161+
env: {
162+
es6: true,
163+
es2020: true,
164+
jest: true,
165+
node: true,
166+
commonjs: true,
167+
},
168+
extends: ['eslint:recommended', 'airbnb-base', 'plugin:prettier/recommended'],
169+
plugins: ['prettier'],
170+
rules: {
171+
'prettier/prettier': 'error',
172+
173+
...additionalChanges,
174+
...importRules,
175+
},
176+
};

0 commit comments

Comments
 (0)