Skip to content

Commit

Permalink
feat: added preferred eslint rules, updated lock files
Browse files Browse the repository at this point in the history
  • Loading branch information
dcpesses committed Feb 13, 2024
1 parent 385ced5 commit 6e3b148
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 5,193 deletions.
80 changes: 80 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,85 @@ module.exports = {
],
rules: {
'unused-imports/no-unused-imports': 'warn',

'array-bracket-spacing': ['error', 'never'],
'block-spacing': ['error', 'never'],
'brace-style': ['error', '1tbs', {allowSingleLine: true}],
'comma-spacing': ['error', {before: false, after: true}],
curly: ['error'],
'dot-location': ['error', 'property'],
'dot-notation': ['error'],
'eol-last': ['error'],
eqeqeq: ['error'],
indent: ['error', 2, {SwitchCase: 0, VariableDeclarator: 1}],
'jsx-quotes': ['error', 'prefer-double'],
'keyword-spacing': ['error'],
'no-case-declarations': [0],
'no-console': [1, {allow: ['warn', 'error']}],
'no-debugger': [1],
'no-empty': ['error'],
'no-extend-native': ['error'],
'no-extra-semi': ['error'],
'no-multi-spaces': ['error'],
'no-restricted-syntax': ['error', 'WithStatement'],
'no-shadow': [
'error',
{
builtinGlobals: true,
allow: [
'Event',
'History',
'Notification',
'Permissions',
'Promise',
'Request',
'event',
'history',
'location',
'open',
'screen',
'status',
],
},
],
'no-sparse-arrays': ['error'],
'no-trailing-spaces': ['error'],
'no-unexpected-multiline': ['error'],
'no-unneeded-ternary': ['error'],
'no-unreachable': ['error'],
'no-unsafe-finally': ['error'],
'no-unused-vars': ['error'],
quotes: ['error', 'single', 'avoid-escape'],
semi: ['error', 'always'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'use-isnan': ['error'],
'valid-typeof': ['error'],

'react/jsx-indent': ['error', 2],
'react/jsx-no-duplicate-props': ['error'],
'react/jsx-uses-react': ['error'],
'react/jsx-uses-vars': ['error'],
'react/no-access-state-in-setstate': ['error'],
'react/no-children-prop': ['error'],
'react/no-deprecated': [1],
'react/no-danger-with-children': ['error'],
'react/no-did-mount-set-state': ['error'],
'react/no-did-update-set-state': ['error'],
'react/no-direct-mutation-state': ['error'],
'react/no-render-return-value': ['error'],
'react/no-typos': ['error'],
'react/no-unescaped-entities': ['error'],
'react/no-unknown-property': ['error'],
'react/no-unused-prop-types': [1],
'react/no-unused-state': ['error'],
'react/no-will-update-set-state': ['error'],
'react/prop-types': ['error'],
'react/require-default-props': [1],
'react/require-render-return': ['error'],
'react/self-closing-comp': ['error', {'component': true, 'html': false}],
'react/sort-comp': ['error'],
'react/sort-prop-types': ['error'],
'react/void-dom-elements-no-children': ['error']
},
};
Loading

0 comments on commit 6e3b148

Please sign in to comment.