refactor: get rid of turborepo
This commit is contained in:
parent
7b5e820285
commit
8a21229940
83 changed files with 209 additions and 3143 deletions
81
.eslintrc.js
81
.eslintrc.js
|
|
@ -1,10 +1,77 @@
|
|||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const fs = require("fs")
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
// This tells ESLint to load the config from the package `eslint-config-custom`
|
||||
extends: ["custom"],
|
||||
settings: {
|
||||
next: {
|
||||
rootDir: ["apps/*/"],
|
||||
extends: [
|
||||
"next",
|
||||
"prettier",
|
||||
"react-app",
|
||||
"react-app/jest",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:storybook/recommended",
|
||||
],
|
||||
parserOptions: {
|
||||
babelOptions: {
|
||||
presets: [require.resolve("next/babel")],
|
||||
},
|
||||
},
|
||||
};
|
||||
rules: {
|
||||
"testing-library/prefer-screen-queries": "off",
|
||||
"@next/next/no-html-link-for-pages": "off",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
"sort-imports": [
|
||||
"error",
|
||||
{
|
||||
ignoreCase: true,
|
||||
ignoreDeclarationSort: true,
|
||||
},
|
||||
],
|
||||
"import/order": [
|
||||
1,
|
||||
{
|
||||
groups: ["external", "builtin", "internal", "sibling", "parent", "index"],
|
||||
pathGroups: [
|
||||
...getDirectoriesToSort().map((singleDir) => ({
|
||||
pattern: `${singleDir}/**`,
|
||||
group: "internal",
|
||||
})),
|
||||
{
|
||||
pattern: "env",
|
||||
group: "internal",
|
||||
},
|
||||
{
|
||||
pattern: "theme",
|
||||
group: "internal",
|
||||
},
|
||||
{
|
||||
pattern: "public/**",
|
||||
group: "internal",
|
||||
position: "after",
|
||||
},
|
||||
],
|
||||
pathGroupsExcludedImportTypes: ["internal"],
|
||||
alphabetize: {
|
||||
order: "asc",
|
||||
caseInsensitive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
function getDirectoriesToSort() {
|
||||
const ignoredSortingDirectories = [".git", ".next", ".vscode", "node_modules"]
|
||||
return getDirectories(process.cwd()).filter((f) => !ignoredSortingDirectories.includes(f))
|
||||
}
|
||||
|
||||
function getDirectories(path) {
|
||||
return fs.readdirSync(path).filter(function (file) {
|
||||
return fs.statSync(path + "/" + file).isDirectory()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue