-
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.
* fix: dup rubocop rules * feat: add commit lint and update lefthook config
- Loading branch information
1 parent
2de6f2c
commit 062d214
Showing
9 changed files
with
438 additions
and
106 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 |
---|---|---|
|
@@ -50,3 +50,5 @@ node_modules | |
|
||
!/.env.sample | ||
config/database.yml | ||
|
||
/.husky |
This file was deleted.
Oops, something went wrong.
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
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
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,8 @@ | ||
export default { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'body-max-line-length': [1, 'always', 200], | ||
'subject-case': [0], | ||
}, | ||
ignores: [(message) => message.includes('CodeFactor')], | ||
}; |
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,32 +1,32 @@ | ||
/** @type {import("@types/eslint").Linter.Config */ | ||
|
||
import globals from "globals"; | ||
import js from "@eslint/js"; | ||
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; | ||
import globals from 'globals'; | ||
import js from '@eslint/js'; | ||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; | ||
|
||
export default [ | ||
js.configs.recommended, | ||
eslintPluginPrettierRecommended, | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: "module", | ||
sourceType: 'module', | ||
globals: { | ||
...globals.browser, | ||
...globals.es2021, | ||
}, | ||
}, | ||
rules: { | ||
"no-unused-vars": [ | ||
"error", | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
args: "after-used", | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
args: 'after-used', | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
"no-var": "error", | ||
"prettier/prettier": "error", | ||
'no-var': 'error', | ||
'prettier/prettier': 'error', | ||
}, | ||
}, | ||
]; |
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,20 +1,22 @@ | ||
commit-msg: | ||
commands: | ||
lint-commit-msg: | ||
run: ruby .hooks/lint_commit_msg.rb | ||
run: yarn commitlint --edit $1 | ||
|
||
pre-commit: | ||
parallel: true | ||
commands: | ||
frontend-linter: | ||
run: yarn lint:js | ||
backend-linter: | ||
eslint_check: | ||
glob: '*.js' | ||
run: yarn run eslint {staged_files} | ||
rubocop_check: | ||
glob: '*.rb' | ||
run: bundle exec rubocop --force-exclusion {staged_files} | ||
frontend-style: | ||
run: yarn lint:css | ||
|
||
pre-push: | ||
commands: | ||
client-tests: | ||
root: "client/" | ||
glob: "*.{ts,tsx}" | ||
run: yarn test | ||
# TODO: If you want to check rspec or bundle-audit before pushing, add them here: | ||
# pre-push: | ||
# 1_rspec: | ||
# skip_empty: false | ||
# run: bundle exec rspec | ||
# 2_bundle-audit: | ||
# skip_empty: false | ||
# run: bundle exec bundle-audit check |
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
Oops, something went wrong.