Skip to content

Commit

Permalink
chore: add linters and workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgrasset committed Feb 22, 2022
1 parent 29086c6 commit ed1c1cd
Show file tree
Hide file tree
Showing 6 changed files with 2,653 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/*
74 changes: 74 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
module.exports = {
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint",
"simple-import-sort",
"unused-imports"
],
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"eol-last": 1,
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
"space-unary-ops": [
2, {
"words": true,
"nonwords": true,
}
],
"no-trailing-spaces": "error",
"keyword-spacing": "off",
"@typescript-eslint/keyword-spacing": ["error"],
"object-curly-spacing": ["error", "always"],
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/no-unescaped-entities": "warn"
}
};
16 changes: 16 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
extends: [
"stylelint-config-standard",
"stylelint-config-sass-guidelines"
],
defaultSeverity: "warning",
rules: {
"at-rule-no-unknown": null,
"indentation": 4,
"max-nesting-depth": 5,
"scss/at-rule-no-unknown": null,
"selector-class-pattern": "^[a-z][a-z0-9\\-_]*[a-z0-9]$",
"selector-max-compound-selectors": 5,
"no-invalid-position-at-import-rule": null,
}
}
Loading

0 comments on commit ed1c1cd

Please sign in to comment.