2019-03-22 03:46:24 +03:00
|
|
|
{
|
2022-10-26 20:37:16 +03:00
|
|
|
"plugins": ["mocha", "import"],
|
2019-03-22 03:46:24 +03:00
|
|
|
"env": {
|
2021-09-12 20:44:30 +03:00
|
|
|
"mocha": true
|
2019-03-22 03:46:24 +03:00
|
|
|
},
|
2021-09-12 20:44:30 +03:00
|
|
|
"extends": ["@malept/eslint-config/src/common"],
|
2020-09-07 03:46:57 +03:00
|
|
|
"globals": {
|
|
|
|
"NodeJS": "readonly"
|
|
|
|
},
|
2019-03-22 03:46:24 +03:00
|
|
|
"rules": {
|
2021-09-12 20:44:30 +03:00
|
|
|
"no-unused-vars": [
|
2019-12-10 08:42:53 +03:00
|
|
|
"error",
|
|
|
|
{
|
2021-09-12 20:44:30 +03:00
|
|
|
"args": "after-used",
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
"ignoreRestSiblings": true,
|
|
|
|
"vars": "all"
|
2019-12-10 08:42:53 +03:00
|
|
|
}
|
|
|
|
],
|
2022-10-26 20:37:16 +03:00
|
|
|
"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
|
|
|
|
}
|
2022-10-26 23:16:55 +03:00
|
|
|
],
|
|
|
|
"import/no-named-as-default": "error"
|
2019-03-22 03:46:24 +03:00
|
|
|
},
|
|
|
|
"overrides": [
|
2021-09-12 20:44:30 +03:00
|
|
|
{
|
|
|
|
"files": ["**/*.ts"],
|
|
|
|
"extends": ["@malept/eslint-config/src/typescript"],
|
2022-11-23 01:39:39 +03:00
|
|
|
"parserOptions": {
|
|
|
|
"project": ["./tsconfig.base.json"]
|
|
|
|
},
|
2021-09-12 20:44:30 +03:00
|
|
|
"rules": {
|
2022-11-23 01:39:39 +03:00
|
|
|
"no-throw-literal": "off",
|
|
|
|
"@typescript-eslint/no-throw-literal": "error",
|
2021-09-12 20:44:30 +03:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"args": "after-used",
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
"ignoreRestSiblings": true,
|
|
|
|
"vars": "all"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2023-08-17 03:33:58 +03:00
|
|
|
{
|
|
|
|
"files": ["ci/**/*.js"],
|
|
|
|
"rules": {
|
|
|
|
"node/no-unpublished-require": "off"
|
|
|
|
}
|
|
|
|
},
|
2019-03-22 03:46:24 +03:00
|
|
|
{
|
2022-10-26 22:34:29 +03:00
|
|
|
"files": ["packages/*/*/test/**/*_spec*.ts", "packages/*/*/test/fixture/**/*.ts"],
|
2019-03-22 03:46:24 +03:00
|
|
|
"rules": {
|
|
|
|
"global-require": "off",
|
2022-05-03 20:29:31 +03:00
|
|
|
"import/no-dynamic-require": "off",
|
2023-08-17 03:33:58 +03:00
|
|
|
"node/no-extraneous-import": "off",
|
2022-05-03 20:29:31 +03:00
|
|
|
"node/no-unpublished-import": "off",
|
|
|
|
"node/no-unpublished-require": "off"
|
2019-03-22 03:46:24 +03:00
|
|
|
}
|
|
|
|
},
|
2021-09-12 20:44:30 +03:00
|
|
|
{
|
2022-11-02 01:27:00 +03:00
|
|
|
"files": ["packages/api/cli/src/**/*.ts", "packages/external/create-electron-app/src/**/*.ts", "tools/*.{js,ts}"],
|
2021-09-12 20:44:30 +03:00
|
|
|
"rules": {
|
2022-01-10 10:40:28 +03:00
|
|
|
"no-process-exit": "off",
|
|
|
|
"node/shebang": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"convertPath": {
|
|
|
|
"src/*.ts": ["src/(.+?)\\.ts$", "dist/$1.js"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2021-09-12 20:44:30 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"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"
|
2019-03-22 03:46:24 +03:00
|
|
|
}
|
2024-09-20 02:53:02 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["packages/plugin/vite/src/**/*.ts"],
|
|
|
|
"rules": {
|
|
|
|
"node/no-unpublished-import": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"allowModules": ["vite"]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2019-03-22 03:46:24 +03:00
|
|
|
}
|
2021-09-12 20:44:30 +03:00
|
|
|
]
|
2019-03-22 03:46:24 +03:00
|
|
|
}
|