Skip to content

Instantly share code, notes, and snippets.

@twsau
Created November 28, 2023 16:43
Show Gist options
  • Save twsau/2c66a6e2485b0115d9b13aaec2d14533 to your computer and use it in GitHub Desktop.
Save twsau/2c66a6e2485b0115d9b13aaec2d14533 to your computer and use it in GitHub Desktop.
next lint template
{
"parser": "@typescript-eslint/parser",
"plugins": ["react", "@typescript-eslint", "autofix", "react-hooks"],
"extends": ["next/core-web-vitals", "plugin:tailwindcss/recommended"],
"rules": {
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports"
}
],
"arrow-body-style": ["error", "as-needed"],
"autofix/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true,
"destructuredArrayIgnorePattern": "^_"
}
],
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"parent",
"sibling",
"index",
"object",
"type"
],
"pathGroups": [
{
"pattern": "@/**/**",
"group": "parent",
"position": "before"
}
],
"alphabetize": { "order": "asc" }
}
],
"no-restricted-imports": [
"error",
{
"patterns": ["../"]
}
],
"react-hooks/exhaustive-deps": "error",
"react/self-closing-comp": [
"error",
{
"component": true,
"html": true
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment