Skip to content

Commit

Permalink
Closes cake-build#78. Proposition of adding code linting and formatin…
Browse files Browse the repository at this point in the history
…g phase before commit
  • Loading branch information
AdaskoTheBeAsT committed Aug 7, 2021
1 parent cc88d86 commit afdbe50
Show file tree
Hide file tree
Showing 10 changed files with 3,505 additions and 234 deletions.
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ indent_size = 4
trim_trailing_whitespace = true

# 2 space indentation for .travis.yml and package.json
[{.travis.yml},package.json]
[{.travis.yml}]
indent_style = space
indent_size = 2

[package.json]
indent_style = space
indent_size = 2

Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules/**
**/*eslintrc.js
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'airbnb-base',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
],
rules: {
},
};
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
6 changes: 6 additions & 0 deletions .importsortrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'.js, .jsx, .ts, .tsx': {
style: 'module',
parser: 'typescript',
},
};
6 changes: 6 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'{apps,libs}/**/*.{js,jsx,ts,tsx},!**/api/**': ['eslint --fix'],
'{apps,libs}/**/*.{js,jsx,ts,tsx,css,scss,md,html,json},!**/api/**': [
'prettier --write',
],
};
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add files here to ignore them from prettier formatting

/dist
/coverage
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}

0 comments on commit afdbe50

Please sign in to comment.