forked from OpenOS-Project-OSP/penguins-eggs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
61 lines (53 loc) · 1.7 KB
/
eslint.config.js
File metadata and controls
61 lines (53 loc) · 1.7 KB
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
52
53
54
55
56
57
58
59
60
61
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import oclifConfig from 'eslint-config-oclif';
import globals from 'globals';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
allConfig: js.configs.all,
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended
});
// Handle CJS/ESM interop for eslint-config-oclif
const oclifFlat = Array.isArray(oclifConfig) ? oclifConfig : oclifConfig.default;
export default [
// Ignores must be in their own object or part of the global config.
{
ignores: [
"dist/**",
"perribrewery/working/**",
"testing/**",
"AppDir/**",
"**/*.d.ts"
]
},
// Oclif Config (Flat)
...oclifFlat,
// Prettier Config (Legacy -> Flat)
...compat.extends("prettier"),
// Custom Rules
{
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
languageOptions: {
globals: {
...globals.node,
...globals.mocha
}
},
rules: {
"@typescript-eslint/no-empty-function": "off",
"node/no-extraneous-import": "off",
"unicorn/consistent-destructuring": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/import-style": "off",
"unicorn/prefer-array-some": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-spread": "off",
"unicorn/prefer-ternary": "off"
}
}
];