Skip to content

Commit

Permalink
feat: improve eslint rules (#50)
Browse files Browse the repository at this point in the history
* feat: improve eslint rules

* Upd

* Upd
  • Loading branch information
Onatolich authored Aug 11, 2020
1 parent 955a0ac commit a8bef60
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/scripts/lint/.eslintrc.library.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = {
}],
'func-names': ['error', 'always'],
'func-style': ['error', 'declaration'],
indent: ['error', 2],
'no-prototype-builtins': 'off',
'object-property-newline': ['error', { allowAllPropertiesOnSameLine: false }],
'object-curly-newline': ['error', {
Expand Down
11 changes: 11 additions & 0 deletions src/scripts/lint/.eslintrc.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ module.exports = {
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }],
'react/jsx-curly-spacing': ['error', {
when: 'never',
children: true,
}],
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
Expand Down Expand Up @@ -72,6 +76,7 @@ module.exports = {
}],
'func-names': ['error', 'always'],
'func-style': ['error', 'declaration'],
indent: ['error', 2],
'no-prototype-builtins': 'off',
'object-curly-newline': ['error', {
ObjectExpression: {
Expand All @@ -93,6 +98,12 @@ module.exports = {
}],
},
overrides: [
{
files: ['*.jsx', '*.tsx'],
rules: {
'no-ternary': 'error',
},
},
{
files: ['*.js', '*.jsx'],
rules: {
Expand Down

0 comments on commit a8bef60

Please sign in to comment.