Created
June 30, 2023 15:49
-
-
Save lurepheonix/41b2ce5a315ef0cb957121cefe35b86a to your computer and use it in GitHub Desktop.
TS: linting, formatting configs for T3 stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://eslint.org/docs/latest/use/configure/ignore | |
### SHARED BETWEEN .gitignore, .dockerignore, .prettierignore, .eslintignore ### | |
## TEMPLATE ## | |
# Tests, analytics, reports | |
coverage/ | |
reports/ | |
.nyc_output | |
# Compiled JS | |
dist/ | |
.next/ | |
# ENV | |
.env | |
.env* | |
!.env.example | |
!.env.*.example | |
# Logs | |
logs/ | |
*.log | |
# Node dependencies | |
node_modules/ | |
# Generated by MacOS | |
.DS_Store | |
# Generated by Windows | |
Thumbs.db | |
## CUSTOM ## | |
# TypeScript artifacts files | |
artifacts/ | |
# Database | |
db/* | |
# TypeDoc generated docs | |
typedoc/ | |
### SHARED BETWEEN .gitignore, .prettierignore, .eslintignore ### | |
## TEMPLATE ## | |
# VS Code | |
.vscode/* | |
!.vscode/extensions.json | |
!.vscode/settings.json | |
## CUSTOM ## | |
!db/exporter/ | |
### SHARED BETWEEN .dockerignore, .prettierignore, .eslintignore ### | |
## TEMPLATE ## | |
# Git | |
.git/ | |
## CUSTOM ## | |
# Excalidraw | |
*.excalidraw | |
### SHARED BETWEEN .prettierignore, .eslintignore ### | |
## TEMPLATE ## | |
# Package manager lockfile | |
package-lock.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"env": { | |
"es2022": true, | |
"node": true, | |
"jest": true | |
}, | |
"ignorePatterns": ["tailwind.config.js"], | |
"extends": [ | |
"eslint:recommended", | |
"next/core-web-vitals", | |
"plugin:@typescript-eslint/eslint-recommended", | |
"plugin:@typescript-eslint/recommended", | |
"plugin:@typescript-eslint/recommended-requiring-type-checking", | |
"plugin:@typescript-eslint/strict", | |
"plugin:import/recommended", | |
"plugin:import/typescript", | |
"plugin:n/recommended", | |
"plugin:promise/recommended", | |
"standard-with-typescript", | |
"standard-jsx", | |
"standard-react", | |
"plugin:tailwindcss/recommended", | |
"plugin:prettier/recommended" | |
], | |
"overrides": [], | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"project": "./tsconfig.json", | |
"ecmaVersion": 2022, | |
"sourceType": "module" | |
}, | |
"plugins": ["@typescript-eslint", "import", "n", "promise", "prettier"], | |
"root": true, | |
"rules": { | |
"n/no-missing-import": 0, | |
"n/no-unsupported-features/es-syntax": 0, | |
"react/react-in-jsx-scope": 0, | |
"@typescript-eslint/explicit-function-return-type": 0, | |
"@typescript-eslint/strict-boolean-expressions": 0, | |
"max-params": ["error", 8], | |
"no-param-reassign": [ | |
"error", | |
{ | |
"props": true, | |
"ignorePropertyModificationsFor": ["acc", "prev"] | |
} | |
], | |
"sort-imports": [ | |
"error", | |
{ | |
"ignoreCase": false, | |
"ignoreDeclarationSort": true, | |
"ignoreMemberSort": false, | |
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"], | |
"allowSeparatedGroups": true | |
} | |
], | |
"import/order": [ | |
"error", | |
{ | |
"alphabetize": { | |
"order": "asc", | |
"caseInsensitive": true | |
}, | |
"groups": [ | |
"builtin", | |
"external", | |
"internal", | |
"parent", | |
"sibling", | |
"index", | |
"object", | |
"type", | |
"unknown" | |
], | |
"newlines-between": "always" | |
} | |
], | |
"@typescript-eslint/consistent-type-imports": [ | |
"warn", | |
{ | |
"prefer": "type-imports", | |
"fixStyle": "inline-type-imports" | |
} | |
], | |
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }] | |
}, | |
"settings": { | |
"import/resolver": { | |
"node": "true", | |
"typescript": "true" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"printWidth": 120, | |
"proseWrap": "always", | |
"singleQuote": true, | |
"tabWidth": 2 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_style = space | |
indent_size = 2 | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = { | |
plugins: { | |
tailwindcss: {}, | |
autoprefixer: {}, | |
}, | |
}; | |
module.exports = config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @type {import("prettier").Config} */ | |
const config = { | |
plugins: [require.resolve("prettier-plugin-tailwindcss")], | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment