Last active
August 6, 2023 18:16
-
-
Save epreston/2c8cbb54fc7b8ba0f2d6294ec20f6380 to your computer and use it in GitHub Desktop.
eslintrc.json - root template, config and rules for prettier, helpful extras
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": true, | |
"env": { | |
"es2022": true, | |
"browser": true, | |
"node": true | |
}, | |
"parserOptions": { | |
"ecmaVersion": 2022, | |
"sourceType": "module" | |
}, | |
"extends": ["eslint:recommended", "prettier"], | |
"globals": { | |
"Atomics": "readonly", | |
"SharedArrayBuffer": "readonly" | |
}, | |
"rules": { | |
"no-debugger": "error", | |
"no-console": ["error", { "allow": ["warn", "error"] }], | |
"semi": "error", | |
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }], | |
"quote-props": ["error", "consistent-as-needed"], | |
"no-throw-literal": ["error"], | |
"arrow-body-style": "off", | |
"prefer-arrow-callback": "off", | |
"no-unused-vars": "off", | |
"no-duplicate-imports": "warn", | |
"no-new-native-nonconstructor": "error", | |
"yoda": ["error", "never", { "exceptRange": true }], | |
"prefer-const": [ | |
"error", | |
{ | |
"destructuring": "any", | |
"ignoreReadBeforeAssign": false | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rules required by
prettier