BlueWallet/.eslintrc

71 lines
2.2 KiB
Plaintext
Raw Normal View History

2018-03-17 18:36:42 +01:00
{
"parser": "@typescript-eslint/parser",
2018-03-17 19:43:34 +01:00
"plugins": [
"@typescript-eslint",
"react-native" // for no-inline-styles rule
],
"extends": [
"standard",
"standard-react",
"standard-jsx",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
// "@react-native-community", // TODO: try to enable
"plugin:prettier/recommended" // removes all eslint rules that can mess up with prettier
2018-03-17 19:43:34 +01:00
],
2018-03-17 21:39:21 +01:00
"rules": {
"react/jsx-handler-names": "off", // activated by standard-react config
"react/display-name": "off",
"react-native/no-inline-styles": "error",
"prettier/prettier": [
"warn",
2018-03-17 21:39:21 +01:00
{
"singleQuote": true,
"printWidth": 140,
"trailingComma": "all",
"arrowParens": "avoid"
2018-03-20 01:49:32 +01:00
}
],
"@typescript-eslint/no-empty-function": "off", // used often in the codebase, useful e.g. in testing
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description",
"ts-ignore": "allow-with-description", // temporary allow to ease the migration
"ts-nocheck": true,
"ts-check": false
}
],
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
// disable rules that are superseded by @typescript-eslint rules
"no-unused-vars": "off",
"no-use-before-define": "off",
// disable rules that we want to enforce only for typescript files
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-var-requires": "off",
2021-09-09 13:00:11 +02:00
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-use-before-define": "off"
},
"overrides": [
{
// enable the rule specifically for TypeScript files
"files": ["*.ts", "*.tsx"],
"rules": {
2021-09-09 13:00:11 +02:00
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-use-before-define": ["error", { "variables": false }]
}
}
],
"env": {
"es6": true
},
"globals": { "fetch": false }
2018-03-17 18:36:42 +01:00
}