summaryrefslogtreecommitdiffstats
path: root/.eslintrc.js
diff options
context:
space:
mode:
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js52
1 files changed, 52 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 000000000..2ea0c1cc6
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,52 @@
+module.exports = {
+ root: true,
+ parser: 'vue-eslint-parser',
+ parserOptions: {
+ parser: {
+ ts: '@typescript-eslint/parser',
+ },
+ ecmaVersion: 2020,
+ },
+ env: {
+ jest: true,
+ },
+ extends: [
+ 'eslint:recommended',
+ 'plugin:vue/base',
+ 'plugin:vue/essential',
+ '@vue/standard',
+ '@vue/typescript/recommended',
+ '@nextcloud',
+ 'plugin:@typescript-eslint/recommended',
+ ],
+ ignorePatterns: ['*.d.ts', 'l10n/*.js'],
+ rules: {
+ 'no-console': 'warn',
+ '@typescript-eslint/no-var-requires': 'off',
+
+ // TODO: Trouble importing .ts files into .vue files for some reason?
+ 'import/extensions': 'off',
+ 'n/no-missing-import': 'off',
+ },
+ settings: {
+ 'import/resolver': {
+ node: {
+ extensions: ['.ts'],
+ },
+ },
+ },
+ overrides: [
+ {
+ files: ['*spec.ts', 'tests/javascript/unit/setup.ts'],
+ rules: {
+ '@typescript-eslint/no-explicit-any': 'off',
+ },
+ },
+ {
+ files: ['src/store/*.ts'],
+ rules: {
+ 'function-paren-newline': ['error', 'multiline'],
+ },
+ },
+ ],
+}