-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add code formatting and linting
- Loading branch information
1 parent
5a51c96
commit 95339f6
Showing
11 changed files
with
2,126 additions
and
185 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
ignore = E203, E266, E501, W503 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
node_modules, | ||
migrations, | ||
app/static, | ||
tests, | ||
.venv, | ||
.devcontainer | ||
per-file-ignores = | ||
app.py: E402, F403 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
npx --no-install commitlint --edit '$1' | ||
npx --no-install commitlint --edit "$1" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx lint-staged |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Ignore specific directories | ||
node_modules/* | ||
.github/* | ||
.vscode/* | ||
.git/* | ||
.devcontainer/* | ||
.husky/* | ||
|
||
# Ignore specific files | ||
package.json | ||
package-lock.json | ||
.gitignore | ||
.prettierrc.cjs | ||
.prettierignore | ||
eslint.config.mjs | ||
.flake8 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
semi: true, | ||
tabWidth: 2, | ||
useTabs: false, | ||
singleQuote: true, | ||
trailingComma: 'es5', | ||
bracketSpacing: true, | ||
arrowParens: 'always', | ||
endOfLine: 'lf', | ||
printWidth: 80, | ||
htmlWhitespaceSensitivity: 'ignore', | ||
cssWhitespaceSensitivity: 'strict', | ||
proseWrap: 'preserve', | ||
overrides: [ | ||
{ | ||
files: '*.html', | ||
options: { | ||
printWidth: 120, | ||
}, | ||
}, | ||
], | ||
}; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { extends: ["@commitlint/config-conventional"] }; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
import prettier from "eslint-plugin-prettier"; | ||
|
||
export default [ | ||
{ | ||
ignores: [ | ||
"**/node_modules/**", | ||
"**/.github/**", | ||
"**/.vscode/**", | ||
"**/.git/**", | ||
"**/.devcontainer/**", | ||
"**/.husky/**", | ||
"**/package.json", | ||
"**/package-lock.json", | ||
"**/.eslintignore", | ||
"**/.prettierrc.cjs", | ||
"**/migrations/**", | ||
"**/tests/**", | ||
], | ||
}, | ||
{ | ||
languageOptions: { globals: globals.browser }, | ||
}, | ||
pluginJs.configs.recommended, | ||
{ | ||
files: ['**/*.js'], | ||
linterOptions: { | ||
noInlineConfig: true, | ||
}, | ||
plugins: { prettier }, | ||
rules: { | ||
"prettier/prettier": "error", | ||
semi: ["error", "always"], | ||
quotes: ["error", "single"], | ||
"comma-dangle": ["error", "always-multiline"], | ||
indent: ["error", 2], | ||
"lines-around-comment": ["error", { beforeBlockComment: true }], | ||
"no-unused-vars": [ | ||
"error", | ||
{ vars: "all", args: "none", ignoreRestSiblings: false }, | ||
], | ||
"no-extra-semi": "error", | ||
"no-console": "warn", | ||
"object-curly-spacing": ["error", "always"], | ||
"space-in-parens": ["error", "never"], | ||
camelcase: ["error", { properties: "always" }], | ||
"function-call-argument-newline": ["error", "consistent"], | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.html'], | ||
rules: { | ||
semi: ["error", "always"], | ||
quotes: ["error", "double"], | ||
indent: ["error", 2], | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.