-
-
Notifications
You must be signed in to change notification settings - Fork 683
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Charlike Mike Reagent <[email protected]>
- Loading branch information
1 parent
3a291ce
commit 975ab31
Showing
85 changed files
with
8,636 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
{ | ||
"projectName": "node-formidable", | ||
"projectOwner": "node-formidable", | ||
"repoType": "github", | ||
"repoHost": "https://github.com", | ||
"imageSize": 100, | ||
"contributorsPerLine": 6, | ||
"commitConvention": "angular", | ||
"commit": true, | ||
"skipCi": true, | ||
"files": [ | ||
"README.md" | ||
], | ||
"contributors": [ | ||
{ | ||
"login": "felixge", | ||
"name": "Felix Geisendörfer", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/15000?s=460&v=4", | ||
"profile": "https://twitter.com/felixge", | ||
"contributions": [ | ||
"code", | ||
"design", | ||
"ideas", | ||
"doc" | ||
] | ||
}, | ||
{ | ||
"login": "tunnckoCore", | ||
"name": "Charlike Mike Reagent", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/5038030?v=4", | ||
"profile": "https://tunnckoCore.com", | ||
"contributions": [ | ||
"bug", | ||
"infra", | ||
"design", | ||
"code", | ||
"doc", | ||
"example", | ||
"ideas", | ||
"maintenance", | ||
"test" | ||
] | ||
}, | ||
{ | ||
"login": "kedarv", | ||
"name": "Kedar", | ||
"avatar_url": "https://avatars1.githubusercontent.com/u/1365665?v=4", | ||
"profile": "https://github.com/kedarv", | ||
"contributions": [ | ||
"code", | ||
"test", | ||
"question", | ||
"bug" | ||
] | ||
}, | ||
{ | ||
"login": "GrosSacASac", | ||
"name": "Walle Cyril", | ||
"avatar_url": "https://avatars0.githubusercontent.com/u/5721194?v=4", | ||
"profile": "https://github.com/GrosSacASac", | ||
"contributions": [ | ||
"question", | ||
"bug", | ||
"code", | ||
"financial", | ||
"ideas", | ||
"maintenance" | ||
] | ||
}, | ||
{ | ||
"login": "xarguments", | ||
"name": "Xargs", | ||
"avatar_url": "https://avatars2.githubusercontent.com/u/40522463?v=4", | ||
"profile": "https://github.com/xarguments", | ||
"contributions": [ | ||
"question", | ||
"bug", | ||
"code", | ||
"maintenance" | ||
] | ||
}, | ||
{ | ||
"login": "Amit-A", | ||
"name": "Amit-A", | ||
"avatar_url": "https://avatars1.githubusercontent.com/u/7987238?v=4", | ||
"profile": "https://github.com/Amit-A", | ||
"contributions": [ | ||
"question", | ||
"bug", | ||
"code" | ||
] | ||
}, | ||
{ | ||
"login": "charmander", | ||
"name": "Charmander", | ||
"avatar_url": "https://avatars1.githubusercontent.com/u/1889843?v=4", | ||
"profile": "https://charmander.me/", | ||
"contributions": [ | ||
"question", | ||
"bug", | ||
"code", | ||
"ideas", | ||
"maintenance" | ||
] | ||
}, | ||
{ | ||
"login": "DylanPiercey", | ||
"name": "Dylan Piercey", | ||
"avatar_url": "https://avatars2.githubusercontent.com/u/4985201?v=4", | ||
"profile": "https://twitter.com/dylan_piercey", | ||
"contributions": [ | ||
"ideas" | ||
] | ||
}, | ||
{ | ||
"login": "ad-m", | ||
"name": "Adam Dobrawy", | ||
"avatar_url": "https://avatars1.githubusercontent.com/u/3618479?v=4", | ||
"profile": "http://ochrona.jawne.info.pl", | ||
"contributions": [ | ||
"bug", | ||
"doc" | ||
] | ||
}, | ||
{ | ||
"login": "amitrohatgi", | ||
"name": "amitrohatgi", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/12177021?v=4", | ||
"profile": "https://github.com/amitrohatgi", | ||
"contributions": [ | ||
"ideas" | ||
] | ||
}, | ||
{ | ||
"login": "fengxinming", | ||
"name": "Jesse Feng", | ||
"avatar_url": "https://avatars2.githubusercontent.com/u/6262382?v=4", | ||
"profile": "https://github.com/fengxinming", | ||
"contributions": [ | ||
"bug" | ||
] | ||
}, | ||
{ | ||
"login": "quantumsheep", | ||
"name": "Nathanael Demacon", | ||
"avatar_url": "https://avatars1.githubusercontent.com/u/7271496?v=4", | ||
"profile": "https://qtmsheep.com", | ||
"contributions": [ | ||
"question", | ||
"code", | ||
"review" | ||
] | ||
}, | ||
{ | ||
"login": "MunMunMiao", | ||
"name": "MunMunMiao", | ||
"avatar_url": "https://avatars1.githubusercontent.com/u/18216142?v=4", | ||
"profile": "https://github.com/MunMunMiao", | ||
"contributions": [ | ||
"bug" | ||
] | ||
}, | ||
{ | ||
"login": "gabipetrovay", | ||
"name": "Gabriel Petrovay", | ||
"avatar_url": "https://avatars0.githubusercontent.com/u/1170398?v=4", | ||
"profile": "https://github.com/gabipetrovay", | ||
"contributions": [ | ||
"bug", | ||
"code" | ||
] | ||
}, | ||
{ | ||
"login": "Elzair", | ||
"name": "Philip Woods", | ||
"avatar_url": "https://avatars0.githubusercontent.com/u/2352818?v=4", | ||
"profile": "https://github.com/Elzair", | ||
"contributions": [ | ||
"code", | ||
"ideas" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Ignore everything! | ||
* | ||
|
||
# de-ignores: add here what you want to be committed | ||
!*.mjs | ||
!*.cjs | ||
!*.js* | ||
!*.ts* | ||
!*.md* | ||
|
||
!**/src | ||
!**/src/** | ||
|
||
!**/test | ||
!**/test/** | ||
|
||
!**/*tests* | ||
!**/*tests*/** | ||
|
||
!**/benchmark* | ||
!**/benchmark*/** | ||
|
||
!**/example* | ||
!**/example*/** | ||
|
||
# re-ignores: add here what you want to be ignored again | ||
test/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
'use strict'; | ||
|
||
const airbnbBase = require('eslint-config-airbnb-base'); | ||
|
||
// eslint-disable-next-line import/no-dynamic-require | ||
const bestPractices = require(airbnbBase.extends[0]); | ||
|
||
const ignoredProps = bestPractices.rules[ | ||
'no-param-reassign' | ||
][1].ignorePropertyModificationsFor.concat( | ||
'err', | ||
'x', | ||
'_', | ||
'opts', | ||
'options', | ||
'settings', | ||
'config', | ||
'cfg', | ||
); | ||
|
||
// Additional rules that are specific and overiding previous | ||
const additionalChanges = { | ||
strict: 'off', | ||
|
||
// Enforce using named functions when regular function is used, | ||
// otherwise use arrow functions | ||
'func-names': ['error', 'always'], | ||
// Always use parens (for consistency). | ||
// https://eslint.org/docs/rules/arrow-parens | ||
'arrow-parens': ['error', 'always', { requireForBlockBody: true }], | ||
'prefer-arrow-callback': [ | ||
'error', | ||
{ allowNamedFunctions: true, allowUnboundThis: true }, | ||
], | ||
// http://eslint.org/docs/rules/max-params | ||
'max-params': ['error', { max: 3 }], | ||
// http://eslint.org/docs/rules/max-statements | ||
'max-statements': ['error', { max: 20 }], | ||
// http://eslint.org/docs/rules/max-statements-per-line | ||
'max-statements-per-line': ['error', { max: 1 }], | ||
// http://eslint.org/docs/rules/max-nested-callbacks | ||
'max-nested-callbacks': ['error', { max: 4 }], | ||
// http://eslint.org/docs/rules/max-depth | ||
'max-depth': ['error', { max: 4 }], | ||
// enforces no braces where they can be omitted | ||
// https://eslint.org/docs/rules/arrow-body-style | ||
// Never enable for object literal. | ||
'arrow-body-style': [ | ||
'error', | ||
'as-needed', | ||
{ requireReturnForObjectLiteral: false }, | ||
], | ||
// Allow functions to be use before define because: | ||
// 1) they are hoisted, | ||
// 2) because ensure read flow is from top to bottom | ||
// 3) logically order of the code. | ||
// 4) the only addition is 'typedefs' option, see overrides for TS files | ||
'no-use-before-define': [ | ||
'error', | ||
{ | ||
functions: false, | ||
classes: true, | ||
variables: true, | ||
}, | ||
], | ||
// Same as AirBnB, but adds `opts`, `options`, `x` and `err` to exclusions! | ||
// disallow reassignment of function parameters | ||
// disallow parameter object manipulation except for specific exclusions | ||
// rule: https://eslint.org/docs/rules/no-param-reassign.html | ||
'no-param-reassign': [ | ||
'error', | ||
{ | ||
props: true, | ||
ignorePropertyModificationsFor: ignoredProps, | ||
}, | ||
], | ||
|
||
// disallow declaration of variables that are not used in the code | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
ignoreRestSiblings: true, // airbnb's default | ||
vars: 'all', // airbnb's default | ||
varsIgnorePattern: '^(?:$$|xx|_|__|[iI]gnor(?:e|ing|ed))', | ||
args: 'after-used', // airbnb's default | ||
argsIgnorePattern: '^(?:$$|xx|_|__|[iI]gnor(?:e|ing|ed))', | ||
|
||
// catch blocks are handled by Unicorns | ||
caughtErrors: 'none', | ||
// caughtErrorsIgnorePattern: '^(?:$$|xx|_|__|[iI]gnor(?:e|ing|ed))', | ||
}, | ||
], | ||
}; | ||
|
||
const importRules = { | ||
'import/namespace': ['error', { allowComputed: true }], | ||
'import/no-absolute-path': 'error', | ||
'import/no-webpack-loader-syntax': 'error', | ||
'import/no-self-import': 'error', | ||
|
||
// Enable this sometime in the future when Node.js has ES2015 module support | ||
// 'import/no-cycle': 'error', | ||
|
||
// Disabled as it doesn't work with TypeScript | ||
// 'import/newline-after-import': 'error', | ||
|
||
'import/no-amd': 'error', | ||
'import/no-duplicates': 'error', | ||
|
||
// Enable this sometime in the future when Node.js has ES2015 module support | ||
// 'import/unambiguous': 'error', | ||
|
||
// Enable this sometime in the future when Node.js has ES2015 module support | ||
// 'import/no-commonjs': 'error', | ||
|
||
// Looks useful, but too unstable at the moment | ||
// 'import/no-deprecated': 'error', | ||
|
||
'import/no-extraneous-dependencies': 'off', | ||
'import/no-mutable-exports': 'error', | ||
'import/no-named-as-default-member': 'error', | ||
'import/no-named-as-default': 'error', | ||
|
||
// Disabled because it's buggy and it also doesn't work with TypeScript | ||
// 'import/no-unresolved': [ | ||
// 'error', | ||
// { | ||
// commonjs: true | ||
// } | ||
// ], | ||
|
||
'import/order': 'error', | ||
'import/no-unassigned-import': [ | ||
'error', | ||
{ allow: ['@babel/polyfill', '@babel/register'] }, | ||
], | ||
|
||
'import/prefer-default-export': 'off', | ||
|
||
// Ensure more web-compat | ||
// ! note that it doesn't work in CommonJS | ||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md | ||
'import/extensions': 'off', | ||
|
||
// ? Always use named exports. Enable? | ||
// 'import/no-default-export': 'error', | ||
|
||
// ? enable? | ||
'import/exports-last': 'off', | ||
|
||
// todo: Enable in future. | ||
// Ensures everything is tested (all exports should be used). | ||
// For cases when you don't want or can't test, add eslint-ignore comment! | ||
// see: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unused-modules.md | ||
'import/no-unused-modules': 'off', | ||
|
||
'import/no-useless-path-segments': ['error', { noUselessIndex: false }], | ||
}; | ||
|
||
module.exports = { | ||
env: { | ||
es6: true, | ||
es2020: true, | ||
jest: true, | ||
node: true, | ||
commonjs: true, | ||
}, | ||
extends: ['eslint:recommended', 'airbnb-base', 'plugin:prettier/recommended'], | ||
plugins: ['prettier'], | ||
rules: { | ||
'prettier/prettier': 'error', | ||
|
||
...additionalChanges, | ||
...importRules, | ||
}, | ||
}; |
Oops, something went wrong.