-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
49 lines (45 loc) · 1.23 KB
/
eslint.config.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
/*Copyright 2024, CompanyName, Inc. All rights reserved.*/
const json = require('eslint-plugin-json');
const header = require('eslint-plugin-header');
const globals = require('globals');
const js = require('@eslint/js');
header.rules.header.meta.schema = false;
const {
FlatCompat,
} = require('@eslint/eslintrc');
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
module.exports = [...compat.extends('eslint:recommended'), {
ignores: [
'node_modules/'
],
plugins: {
json,
header
},
languageOptions: {
globals: {
...globals.node,
__dirname: true,
require: true,
module: true,
process: true,
Buffer: true,
describe: true,
context: true,
before: true,
after: true
},
ecmaVersion: 'latest',
sourceType: 'commonjs'
},
rules: {
'header/header': ['warn', 'block', {
'pattern': 'Copyright \\d{4}, CompanyName, Inc. All rights reserved.',
'template': 'Copyright 2024, CompanyName, Inc. All rights reserved.'
}]
},
}];