Skip to content

Commit

Permalink
Globalified eslint and prettier settings
Browse files Browse the repository at this point in the history
  • Loading branch information
siepra committed Dec 17, 2021
1 parent 7906bb9 commit 496e7db
Show file tree
Hide file tree
Showing 6 changed files with 1,202 additions and 72 deletions.
68 changes: 68 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
module.exports = {
env: {
"jest/globals": true
},
root: true,
extends: ['standard-with-typescript'],
parserOptions: {
project: './tsconfig.json'
},
parser: '@typescript-eslint/parser',
plugins: ['react-hooks', 'jest'],
rules: {
'no-unused-vars': 'off',
'no-void': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-unused-vars-experimental': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/prefer-reduce-type-parameter': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-dynamic-delete': 'off',
'generator-star-spacing': ['error', { before: false, after: true }],
'yield-star-spacing': ['error', { before: false, after: true }],
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'error',
'no-case-declarations': 'off',
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}
]
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-unused-vars-experimental': 'off',
'no-redeclare': 'off'
}
},
{
files: ['*.test.tsx'],
rules: {
'no-irregular-whitespace': 'off'
}
},
{
"files": [
'*.test.js',
'*.test.ts'
],
"env": {
"jest": true
}
}
]
}
12 changes: 12 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const prettierConfigStandard = require('prettier-config-standard')
const modifiedConfig = {
...prettierConfigStandard,
singleQuote: true,
jsxSingleQuote: true,
spaceBeforeFunctionParen: true,
printWidth: 100,
parser: 'typescript'
// ... other modified settings here
}

module.exports = modifiedConfig
Loading

0 comments on commit 496e7db

Please sign in to comment.