diff options
author | Kristóf Marussy <marussy@mit.bme.hu> | 2021-08-22 21:35:53 +0200 |
---|---|---|
committer | Kristóf Marussy <marussy@mit.bme.hu> | 2021-08-22 21:36:34 +0200 |
commit | c644cb26384cd126a1e71ce652b358e0a87e3b59 (patch) | |
tree | 19f29cb466098af0cbb742cb18a88d2a632643ec /language-web/.eslintrc.js | |
parent | Covert language-web to TypeScript (diff) | |
download | refinery-c644cb26384cd126a1e71ce652b358e0a87e3b59.tar.gz refinery-c644cb26384cd126a1e71ce652b358e0a87e3b59.tar.zst refinery-c644cb26384cd126a1e71ce652b358e0a87e3b59.zip |
Add ESLint config
Diffstat (limited to 'language-web/.eslintrc.js')
-rw-r--r-- | language-web/.eslintrc.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/language-web/.eslintrc.js b/language-web/.eslintrc.js new file mode 100644 index 00000000..bf421f9d --- /dev/null +++ b/language-web/.eslintrc.js | |||
@@ -0,0 +1,30 @@ | |||
1 | // Loosely based on | ||
2 | // https://github.com/iamturns/create-exposed-app/blob/f14e435b8ce179c89cce3eea89e56202153a53da/.eslintrc.js | ||
3 | module.exports = { | ||
4 | plugins: [ | ||
5 | '@typescript-eslint', | ||
6 | ], | ||
7 | extends: [ | ||
8 | 'airbnb', | ||
9 | 'airbnb-typescript', | ||
10 | 'airbnb/hooks', | ||
11 | 'plugin:@typescript-eslint/recommended', | ||
12 | 'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
13 | ], | ||
14 | parserOptions: { | ||
15 | project: './tsconfig.json', | ||
16 | }, | ||
17 | rules: { | ||
18 | // https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html | ||
19 | 'import/prefer-default-export': 'off', | ||
20 | 'import/no-default-export': 'error', | ||
21 | // propTypes are for runtime validation, but we rely on TypeScript for build-time validation: | ||
22 | // https://github.com/yannickcr/eslint-plugin-react/issues/2275#issuecomment-492003857 | ||
23 | 'react/prop-types': 'off', | ||
24 | }, | ||
25 | ignorePatterns: [ | ||
26 | '*.js', | ||
27 | 'build/**/*', | ||
28 | 'src/main/js/xtext/**/*', | ||
29 | ], | ||
30 | }; | ||