forked from github/plane
60 lines
1.3 KiB
JavaScript
60 lines
1.3 KiB
JavaScript
|
/**
|
||
|
* Adds three new lint plugins over the existing configuration:
|
||
|
* This is used to lint staged files only.
|
||
|
* We should remove this file once the entire codebase follows these rules.
|
||
|
*/
|
||
|
module.exports = {
|
||
|
root: true,
|
||
|
extends: [
|
||
|
"custom",
|
||
|
],
|
||
|
parser: "@typescript-eslint/parser",
|
||
|
settings: {
|
||
|
"import/resolver": {
|
||
|
typescript: {},
|
||
|
node: {
|
||
|
moduleDirectory: ["node_modules", "."],
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
rules: {
|
||
|
"import/order": [
|
||
|
"error",
|
||
|
{
|
||
|
groups: ["builtin", "external", "internal", "parent", "sibling"],
|
||
|
pathGroups: [
|
||
|
{
|
||
|
pattern: "react",
|
||
|
group: "external",
|
||
|
position: "before",
|
||
|
},
|
||
|
{
|
||
|
pattern: "lucide-react",
|
||
|
group: "external",
|
||
|
position: "after",
|
||
|
},
|
||
|
{
|
||
|
pattern: "@headlessui/**",
|
||
|
group: "external",
|
||
|
position: "after",
|
||
|
},
|
||
|
{
|
||
|
pattern: "@plane/**",
|
||
|
group: "external",
|
||
|
position: "after",
|
||
|
},
|
||
|
{
|
||
|
pattern: "@/**",
|
||
|
group: "internal",
|
||
|
},
|
||
|
],
|
||
|
pathGroupsExcludedImportTypes: ["builtin", "internal", "react"],
|
||
|
alphabetize: {
|
||
|
order: "asc",
|
||
|
caseInsensitive: true,
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
};
|