Skip to content

Commit

Permalink
refactor: update starter with new dependecies, linters and convention…
Browse files Browse the repository at this point in the history
…al commits
  • Loading branch information
lnikell committed Oct 30, 2020
1 parent 6fe9550 commit 317770c
Show file tree
Hide file tree
Showing 24 changed files with 14,979 additions and 11,247 deletions.
21 changes: 21 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"scope-enum": [
2,
"always",
[
"components",
"constants",
"hooks",
"icons",
"images",
"layouts",
"pages",
"styles",
"templates",
"utils"
]
]
}
}
38 changes: 29 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: ['plugin:react/recommended', 'airbnb', 'prettier', 'prettier/react'],
extends: ['airbnb', 'airbnb/hooks', 'airbnb/whitespace', 'prettier', 'prettier/react'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
Expand All @@ -18,19 +17,40 @@ module.exports = {
},
plugins: ['react'],
rules: {
'react/jsx-filename-extension': [
2,
'no-shadow': 'off',
'react/no-array-index-key': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-danger': 'off',
'react/jsx-sort-props': [
'error',
{
callbacksLast: true,
shorthandLast: true,
noSortAlphabetically: true,
},
],
'import/order': [
'error',
{
extensions: ['.js'],
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'react/no-array-index-key': 0,
'react/jsx-props-no-spreading': 0,
'react/no-danger': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['gatsby-config.js', 'gatsby-node.js', 'gatsby-ssr.js'],
devDependencies: [
'.storybook/**',
'src/components/**/*.stories.js',
'src/components/**/*.stories.jsx',
'gatsby-config.js',
'gatsby-node.js',
'gatsby-ssr.js',
],
},
],
'jsx-a11y/label-has-associated-control': [
Expand Down
1 change: 1 addition & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged --concurrent false"
}
}
7 changes: 4 additions & 3 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"*.{js,html,css,scss,md}": "prettier --write",
"*.js": "eslint --cache --fix"
}
"*.{js,jsx,html,css,scss,md}": "prettier --write",
"*.{js,jsx}": "eslint --cache --fix",
"*.{md}": "markdownlint --fix --ignore-path .gitignore"
}
4 changes: 4 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"line-length": false,
"ol-prefix": false
}
21 changes: 21 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

{
"extends": [
"stylelint-config-standard",
"stylelint-config-recommended-scss",
"stylelint-config-css-modules",
"stylelint-config-recess-order"
],
"rules": {
"no-descending-specificity": null,
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"value"
]
}
]
}
}
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"DavidAnson.vscode-markdownlint",
"clinyong.vscode-css-modules",
"streetsidesoftware.code-spell-checker",
"mrmlnc.vscode-scss"
]
}
3 changes: 2 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"baseUrl": "src"
"baseUrl": "src",
"jsx": "react"
}
}
Loading

0 comments on commit 317770c

Please sign in to comment.