-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.js
51 lines (48 loc) · 1.37 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* This file contains the default linting configuration for JS code wherever it may
* appear. Separately, there are rulesets like node, browser, and node-test, each for
* their respective environments.
*
* Copyright (c) 2017 Jeremy Thomerson
* Licensed under the MIT license.
*/
'use strict';
const ignores = require('./partials/ignores'),
base = require('./partials/base'),
javascript = require('./partials/javascript'),
typescript = require('./partials/typescript'),
vueConfig = require('./partials/vue'),
vueBaseRules = require('./partials/vue/vue-base'),
vue3rules = require('./partials/vue/vue-3'),
typeDefintions = require('./partials/type-definitions'),
esLint = require('@eslint/js'),
typescriptESLint = require('typescript-eslint'),
eslintPluginVue = require('eslint-plugin-vue');
module.exports = [
esLint.configs.recommended,
ignores,
base,
...typescriptESLint.configs.recommended,
{
files: [ '**/*.ts' ],
...typescript,
},
{
files: [ '**/*.js', '**/*.cjs' ],
...javascript,
},
{
files: [ '*.d.ts' ],
...typeDefintions,
},
...eslintPluginVue.configs['flat/strongly-recommended'],
{
files: [ '**/*.vue' ],
...vueConfig,
rules: {
...typescript.rules,
...vueBaseRules,
...vue3rules,
},
},
];