eslint: add get base config function
remove unnecessary exports
This commit is contained in:
parent
0cc22efb74
commit
24de480b5d
@ -1,9 +1,6 @@
|
||||
const base = require('eslint-config-custom/_base');
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
project: 'tsconfig.json',
|
||||
tsconfigRootDir: __dirname,
|
||||
sourceType: 'module',
|
||||
},
|
||||
...base(__dirname),
|
||||
extends: ['custom/nest'],
|
||||
};
|
||||
|
||||
10
packages/eslint-config-custom/_base.js
Normal file
10
packages/eslint-config-custom/_base.js
Normal file
@ -0,0 +1,10 @@
|
||||
module.exports = function (dirname) {
|
||||
return {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
project: 'tsconfig.json',
|
||||
tsconfigRootDir: dirname,
|
||||
sourceType: 'module',
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1,8 +1,3 @@
|
||||
module.exports = {
|
||||
extends: ['next', 'turbo', 'prettier'],
|
||||
rules: {
|
||||
'@next/next/no-html-link-for-pages': 'off',
|
||||
'react/jsx-key': 'off',
|
||||
},
|
||||
};
|
||||
|
||||
extends: ['turbo', 'prettier'],
|
||||
};
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
const nest = require('./nest');
|
||||
const common = require('./common');
|
||||
|
||||
module.exports = {
|
||||
common,
|
||||
nest,
|
||||
};
|
||||
@ -8,7 +8,6 @@ module.exports = {
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:unicorn/recommended',
|
||||
],
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
jest: true,
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
||||
"@typescript-eslint/parser": "^5.30.7",
|
||||
"eslint": "^8.28.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||
"eslint-config-next": "13.0.0",
|
||||
@ -15,6 +16,7 @@
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "7.31.8",
|
||||
"eslint-plugin-testing-library": "^5.9.1",
|
||||
"eslint-plugin-unicorn": "^45.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
18
yarn.lock
18
yarn.lock
@ -1191,7 +1191,7 @@
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/utils@5.44.0":
|
||||
"@typescript-eslint/utils@5.44.0", "@typescript-eslint/utils@^5.13.0":
|
||||
version "5.44.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.44.0.tgz#d733da4d79d6c30f1a68b531cdda1e0c1f00d52d"
|
||||
integrity sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==
|
||||
@ -2408,6 +2408,15 @@ eslint-config-airbnb-typescript@^17.0.0:
|
||||
dependencies:
|
||||
eslint-config-airbnb-base "^15.0.0"
|
||||
|
||||
eslint-config-airbnb@^19.0.4:
|
||||
version "19.0.4"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz#84d4c3490ad70a0ffa571138ebcdea6ab085fdc3"
|
||||
integrity sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==
|
||||
dependencies:
|
||||
eslint-config-airbnb-base "^15.0.0"
|
||||
object.assign "^4.1.2"
|
||||
object.entries "^1.1.5"
|
||||
|
||||
eslint-config-next@13.0.0:
|
||||
version "13.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-13.0.0.tgz#d533ee1dbd6576fd3759ba4db4d5a6c4e039c242"
|
||||
@ -2552,6 +2561,13 @@ eslint-plugin-react@^7.31.7:
|
||||
semver "^6.3.0"
|
||||
string.prototype.matchall "^4.0.8"
|
||||
|
||||
eslint-plugin-testing-library@^5.9.1:
|
||||
version "5.9.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.9.1.tgz#12e4bd34c48683ee98af4df2e3318ec9f51dcf8a"
|
||||
integrity sha512-6BQp3tmb79jLLasPHJmy8DnxREe+2Pgf7L+7o09TSWPfdqqtQfRZmZNetr5mOs3yqZk/MRNxpN3RUpJe0wB4LQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/utils" "^5.13.0"
|
||||
|
||||
eslint-plugin-turbo@0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-turbo/-/eslint-plugin-turbo-0.0.4.tgz#966f3dd6202143d0c28dc9cdbb48b0f779d06172"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user