forked from waxeye7/screeps-bounty-arena
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
68 lines (66 loc) · 1.62 KB
/
Copy patheslint.config.js
File metadata and controls
68 lines (66 loc) · 1.62 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
62
63
64
65
66
67
68
import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
const screepsGlobals = {
ATTACK: 'readonly',
CARRY: 'readonly',
ERR_NOT_IN_RANGE: 'readonly',
FIND_CONSTRUCTION_SITES: 'readonly',
FIND_DROPPED_RESOURCES: 'readonly',
FIND_HOSTILE_CREEPS: 'readonly',
FIND_MY_CREEPS: 'readonly',
FIND_MY_SPAWNS: 'readonly',
FIND_MY_STRUCTURES: 'readonly',
FIND_SOURCES: 'readonly',
FIND_STRUCTURES: 'readonly',
Game: 'readonly',
HEAL: 'readonly',
Memory: 'writable',
MOVE: 'readonly',
RANGED_ATTACK: 'readonly',
RESOURCE_ENERGY: 'readonly',
STRUCTURE_CONTAINER: 'readonly',
STRUCTURE_EXTENSION: 'readonly',
STRUCTURE_RAMPART: 'readonly',
STRUCTURE_ROAD: 'readonly',
STRUCTURE_SPAWN: 'readonly',
STRUCTURE_TOWER: 'readonly',
STRUCTURE_WALL: 'readonly',
WORK: 'readonly',
};
export default tseslint.config(
{
ignores: ['dist/**', 'coverage/**', 'node_modules/**'],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.{js,mjs,ts}'],
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.node,
...globals.vitest,
...screepsGlobals,
},
sourceType: 'module',
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
},
{
files: ['**/*.d.ts'],
rules: {
'@typescript-eslint/no-empty-object-type': 'off',
},
},
);