UNPKG

1.84 kBJavaScriptView Raw
1/**
2 * https://www.npmjs.com/package/eslint
3 */
4module.exports = {
5 root: false,
6 env: {
7 browser: true,
8 es6: true,
9 node: true,
10 },
11 extends: ['eslint:recommended'],
12 overrides: [
13 /**
14 * - https://www.npmjs.com/package/@typescript-eslint/eslint-plugin
15 * - https://www.npmjs.com/package/@typescript-eslint/parser
16 */
17 {
18 extends: [
19 'plugin:@typescript-eslint/recommended',
20 'plugin:@typescript-eslint/recommended-requiring-type-checking',
21 ],
22 files: ['**/*.ts', '**/*.tsx'],
23 parserOptions: {
24 ecmaVersion: 2018,
25 project: './tsconfig.json',
26 extraFileExtensions: ['.vue'],
27 sourceType: 'module',
28 },
29 plugins: ['@typescript-eslint'],
30 rules: {
31 '@typescript-eslint/ban-types': 'off',
32 '@typescript-eslint/explicit-function-return-type': 'off',
33 '@typescript-eslint/no-empty-function': 'off',
34 '@typescript-eslint/no-explicit-any': 'off',
35 '@typescript-eslint/no-unused-vars': 'off',
36 '@typescript-eslint/no-var-requires': 'off',
37 '@typescript-eslint/explicit-member-accessibility': ['warn'],
38 },
39 },
40 /**
41 * - https://www.npmjs.com/package/eslint-plugin-html
42 */
43 {
44 files: ['**/*.html'],
45 plugins: ['html'],
46 },
47 /**
48 * - https://www.npmjs.com/package/eslint-plugin-json
49 */
50 {
51 extends: ['plugin:json/recommended'],
52 files: ['**/*.json'],
53 plugins: ['json'],
54 },
55 {
56 env: {
57 mocha: true,
58 },
59 files: ['tests/**/*', '**/*.spec.*', '**/*.test.*'],
60 },
61 ],
62 parser: '@babel/eslint-parser',
63 parserOptions: {
64 ecmaFeatures: {
65 jsx: true,
66 },
67 },
68 rules: {
69 'no-empty': 'off',
70 'no-prototype-builtins': 'off',
71 'space-before-function-paren': 'off',
72 },
73};