Skip to content

Commit

Permalink
Update stylistic rules (#187)
Browse files Browse the repository at this point in the history
* demote no-console to warn

* update react rules

* add arrow-body-style

* minor version bump

* change never to as-needed

* fix mixup

---------

Co-authored-by: Julian Schleemann <[email protected]>
  • Loading branch information
reiv and Julian Schleemann authored Feb 5, 2024
1 parent 5087ed8 commit bdd0ec1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion eslint/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = {
alphabetize: {order: 'asc', caseInsensitive: true},
},
],
'no-console': ['error', {allow: ['info', 'warn', 'error']}],
'arrow-body-style': ['warn', 'as-needed'],
'no-console': ['warn', {allow: ['info', 'warn', 'error', 'debug']}],
},
};
7 changes: 5 additions & 2 deletions eslint/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
files: ['**/*.tsx', '**/*.jsx'],
plugins: {react: reactPlugin, 'react-hooks': reactHooksPlugin},
settings: {
'react': {
react: {
version: 'detect',
},
},
Expand All @@ -20,6 +20,9 @@ module.exports = {
...reactHooksPlugin.configs.recommended.rules,
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/jsx-curly-brace-presence': ['error', 'never'],
'react/jsx-boolean-value': 'warn',
'react/jsx-curly-brace-presence': ['warn', 'never'],
'react/jsx-no-useless-fragment': 'warn',
'react/self-closing-comp': 'warn',
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmina/linting",
"version": "2.0.1",
"version": "2.1.0",
"description": "A collection of opinionated in-house linting rules.",
"main": "index.js",
"scripts": {},
Expand Down

0 comments on commit bdd0ec1

Please sign in to comment.