aboutsummaryrefslogtreecommitdiffstats
path: root/language-web/.eslintrc.js
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-10-05 21:27:30 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-10-05 21:47:45 +0200
commit5032e0c67792838d6754d172301e2373cf68deb7 (patch)
tree6ec80e200e15f45659b5be1af4da65729f26d888 /language-web/.eslintrc.js
parentdocs: fix typo (diff)
downloadrefinery-5032e0c67792838d6754d172301e2373cf68deb7.tar.gz
refinery-5032e0c67792838d6754d172301e2373cf68deb7.tar.zst
refinery-5032e0c67792838d6754d172301e2373cf68deb7.zip
ci(web): add eslint and stylelint to sonar
Diffstat (limited to 'language-web/.eslintrc.js')
-rw-r--r--language-web/.eslintrc.js32
1 files changed, 4 insertions, 28 deletions
diff --git a/language-web/.eslintrc.js b/language-web/.eslintrc.js
index b4c83bb8..810a5ccd 100644
--- a/language-web/.eslintrc.js
+++ b/language-web/.eslintrc.js
@@ -1,33 +1,9 @@
1// Loosely based on
2// https://github.com/iamturns/create-exposed-app/blob/f14e435b8ce179c89cce3eea89e56202153a53da/.eslintrc.js
3module.exports = { 1module.exports = {
4 plugins: [ 2 plugins: [
5 '@typescript-eslint', 3 'sonarjs',
6 ], 4 ],
7 extends: [ 5 extends: [
8 'airbnb', 6 './.eslintrc.ci.js',
9 'airbnb-typescript', 7 'plugin:sonarjs/recommended',
10 'airbnb/hooks',
11 'plugin:@typescript-eslint/recommended',
12 'plugin:@typescript-eslint/recommended-requiring-type-checking',
13 ], 8 ],
14 parserOptions: { 9}
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 // Make sure switches are exhaustive: https://stackoverflow.com/a/60166264
25 'default-case': 'off',
26 '@typescript-eslint/switch-exhaustiveness-check': 'error',
27 },
28 ignorePatterns: [
29 '*.js',
30 'build/**/*',
31 'src/main/js/xtext/**/*',
32 ],
33};