mirror of
https://github.com/desktop/desktop
synced 2024-08-27 12:11:00 +00:00
133 lines
2.5 KiB
YAML
133 lines
2.5 KiB
YAML
root: true
|
|
parser: '@typescript-eslint/parser'
|
|
plugins:
|
|
- '@typescript-eslint'
|
|
- babel
|
|
- react
|
|
- json
|
|
- jsdoc
|
|
|
|
settings:
|
|
react:
|
|
version: '16.3'
|
|
|
|
extends:
|
|
- prettier
|
|
- prettier/react
|
|
|
|
rules:
|
|
##########
|
|
# CUSTOM #
|
|
##########
|
|
insecure-random: error
|
|
|
|
###########
|
|
# PLUGINS #
|
|
###########
|
|
# TYPESCRIPT
|
|
'@typescript-eslint/naming-convention':
|
|
- error
|
|
- selector: interface
|
|
format:
|
|
- PascalCase
|
|
custom:
|
|
regex: '^I[A-Z]'
|
|
match: true
|
|
- selector: class
|
|
format:
|
|
- PascalCase
|
|
'@typescript-eslint/consistent-type-assertions':
|
|
- error
|
|
- assertionStyle: 'as'
|
|
'@typescript-eslint/no-unused-expressions': error
|
|
'@typescript-eslint/explicit-member-accessibility': error
|
|
'@typescript-eslint/no-unused-vars':
|
|
- error
|
|
- args: 'none'
|
|
'@typescript-eslint/no-use-before-define':
|
|
- error
|
|
- functions: false
|
|
variables: false
|
|
typedefs: false
|
|
'@typescript-eslint/member-ordering':
|
|
- error
|
|
- default:
|
|
- static-field
|
|
- static-method
|
|
- field
|
|
- abstract-method
|
|
- constructor
|
|
- method
|
|
'@typescript-eslint/no-extraneous-class': error
|
|
|
|
# Babel
|
|
babel/no-invalid-this: error
|
|
|
|
# React
|
|
react/jsx-boolean-value:
|
|
- error
|
|
- always
|
|
react/jsx-key: error
|
|
react/jsx-no-bind: error
|
|
react/no-string-refs: error
|
|
react/jsx-uses-vars: error
|
|
react/jsx-uses-react: error
|
|
react/no-unused-state: error
|
|
|
|
# JSDoc
|
|
jsdoc/check-alignment: error
|
|
jsdoc/check-tag-names: error
|
|
jsdoc/check-types: error
|
|
jsdoc/implements-on-classes: error
|
|
jsdoc/newline-after-description: error
|
|
jsdoc/no-undefined-types: error
|
|
jsdoc/valid-types: error
|
|
|
|
# Would love to enable these at some point but
|
|
# they cause way to many issues now.
|
|
#jsdoc/check-param-names: error
|
|
#jsdoc/require-jsdoc:
|
|
# - error
|
|
# - publicOnly: true
|
|
|
|
###########
|
|
# BUILTIN #
|
|
###########
|
|
curly: error
|
|
no-new-wrappers: error
|
|
no-redeclare:
|
|
- error
|
|
- builtinGlobals: true
|
|
no-eval: error
|
|
no-sync: error
|
|
no-var: error
|
|
prefer-const: error
|
|
eqeqeq:
|
|
- error
|
|
- smart
|
|
strict:
|
|
- error
|
|
- global
|
|
no-buffer-constructor: error
|
|
|
|
###########
|
|
# SPECIAL #
|
|
###########
|
|
no-restricted-syntax:
|
|
- error
|
|
# no-default-export
|
|
- selector: ExportDefaultDeclaration
|
|
message: Use of default exports is forbidden
|
|
|
|
overrides:
|
|
- files: '*.d.ts'
|
|
rules:
|
|
strict:
|
|
- error
|
|
- never
|
|
|
|
parserOptions:
|
|
sourceType: module
|
|
ecmaFeatures:
|
|
jsx: true
|