1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add recommended eslint rules for react

This commit is contained in:
Bill Thornton 2021-05-28 12:31:31 -04:00
parent eb605615d1
commit c7296753af
3 changed files with 246 additions and 0 deletions

View file

@ -4,6 +4,7 @@ module.exports = {
root: true,
plugins: [
'@babel',
'react',
'promise',
'import',
'eslint-comments'
@ -24,6 +25,7 @@ module.exports = {
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
// 'plugin:promise/recommended',
'plugin:import/errors',
'plugin:eslint-comments/recommended',
@ -37,6 +39,7 @@ module.exports = {
'comma-spacing': ['error'],
'eol-last': ['error'],
'indent': ['error', 4, { 'SwitchCase': 1 }],
'jsx-quotes': ['error', 'prefer-single'],
'keyword-spacing': ['error'],
'max-statements-per-line': ['error'],
'no-floating-decimal': ['error'],
@ -55,6 +58,11 @@ module.exports = {
'space-infix-ops': 'error',
'yoda': 'error'
},
settings: {
react: {
version: 'detect'
}
},
overrides: [
{
files: [