-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
39 lines (32 loc) · 981 Bytes
/
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
'use strict';
const { recommended } = require('@eslint/js').configs;
const configPrettier = require('eslint-config-prettier');
const pluginPrettier = require('eslint-plugin-prettier');
const globals = require('./rules/globals.js');
const configMetarhia = {
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'commonjs',
globals,
},
plugins: { prettier: pluginPrettier },
ignores: ['node_modules/*'],
rules: {},
};
const files = [
'./rules/possible-errors.js',
'./rules/best-practices.js',
'./rules/strict-mode.js',
'./rules/variables.js',
'./rules/nodejs-and-commonjs.js',
'./rules/stylistic-issues.js',
'./rules/ecmascript-6.js',
'./rules/ecmascript-13.js',
];
const sections = files.map(require);
Object.assign(configMetarhia.rules, recommended.rules);
Object.assign(configMetarhia.rules, configPrettier.rules);
for (const section of sections) {
Object.assign(configMetarhia.rules, section);
}
module.exports = [configMetarhia];