135 строки
3.3 KiB
JSON
135 строки
3.3 KiB
JSON
{
|
|
"plugins": ["mocha", "import"],
|
|
"env": {
|
|
"mocha": true
|
|
},
|
|
"extends": ["@malept/eslint-config/src/common"],
|
|
"globals": {
|
|
"NodeJS": "readonly"
|
|
},
|
|
"rules": {
|
|
"no-unused-vars": [
|
|
"error",
|
|
{
|
|
"args": "after-used",
|
|
"argsIgnorePattern": "^_",
|
|
"ignoreRestSiblings": true,
|
|
"vars": "all"
|
|
}
|
|
],
|
|
"mocha/no-exclusive-tests": "error",
|
|
"import/order": [
|
|
"error",
|
|
{
|
|
"groups": ["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"],
|
|
"newlines-between": "always",
|
|
"alphabetize": {
|
|
"order": "asc",
|
|
"caseInsensitive": true
|
|
}
|
|
}
|
|
],
|
|
"sort-imports": [
|
|
"error",
|
|
{
|
|
"ignoreDeclarationSort": true,
|
|
"allowSeparatedGroups": true,
|
|
"ignoreCase": true
|
|
}
|
|
],
|
|
"import/no-named-as-default": "error"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["**/*.ts"],
|
|
"extends": ["@malept/eslint-config/src/typescript"],
|
|
"parserOptions": {
|
|
"project": ["./tsconfig.base.json"]
|
|
},
|
|
"rules": {
|
|
"no-throw-literal": "off",
|
|
"@typescript-eslint/no-throw-literal": "error",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
"args": "after-used",
|
|
"argsIgnorePattern": "^_",
|
|
"ignoreRestSiblings": true,
|
|
"vars": "all"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["ci/**/*.js"],
|
|
"rules": {
|
|
"node/no-unpublished-require": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["packages/*/*/test/**/*_spec*.ts", "packages/*/*/test/fixture/**/*.ts"],
|
|
"rules": {
|
|
"global-require": "off",
|
|
"import/no-dynamic-require": "off",
|
|
"node/no-extraneous-import": "off",
|
|
"node/no-unpublished-import": "off",
|
|
"node/no-unpublished-require": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["packages/api/cli/src/**/*.ts", "packages/external/create-electron-app/src/**/*.ts", "tools/*.{js,ts}"],
|
|
"rules": {
|
|
"no-process-exit": "off",
|
|
"node/shebang": [
|
|
"error",
|
|
{
|
|
"convertPath": {
|
|
"src/*.ts": ["src/(.+?)\\.ts$", "dist/$1.js"]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["packages/api/core/test/**/*.ts", "packages/maker/*/src/Maker*.ts"],
|
|
"rules": {
|
|
"@typescript-eslint/no-var-requires": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["packages/*/*/test/fixture/**/*.js", "packages/*/*/test/fixtures/**/*.js"],
|
|
"rules": {
|
|
"node/no-extraneous-require": "off",
|
|
"node/no-missing-require": "off",
|
|
"node/no-unpublished-require": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["packages/plugin/webpack/test/fixtures/**/*.js"],
|
|
"rules": {
|
|
"no-process-exit": "off",
|
|
"no-undef": "off",
|
|
"import/no-unresolved": "off",
|
|
"node/no-missing-import": "off",
|
|
"node/no-unpublished-import": "off",
|
|
"node/no-unsupported-features/es-syntax": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["packages/utils/web-multi-logger/static/*.js"],
|
|
"env": {
|
|
"browser": true,
|
|
"node": false
|
|
}
|
|
},
|
|
{
|
|
"files": ["tools/*.{js,ts}"],
|
|
"rules": {
|
|
"node/no-unpublished-import": "off",
|
|
"node/no-unpublished-require": "off",
|
|
"node/shebang": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|