forked from sugarlabs/musicblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
71 lines (70 loc) · 2.05 KB
/
eslint.config.mjs
File metadata and controls
71 lines (70 loc) · 2.05 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
69
70
71
import js from '@eslint/js';
import globals from 'globals';
import babelParser from '@babel/eslint-parser';
import prettierConfig from 'eslint-config-prettier';
export default [
js.configs.recommended,
prettierConfig,
{
ignores: [
'**/node_modules/**',
'**/lib/**',
'**/dist/**',
'**/build/**',
'**/coverage/**',
'**/*.min.js',
'**/bower_components/**',
'**/planet/libs/**',
],
},
{
linterOptions: {
reportUnusedDisableDirectives: 'off',
},
},
{
files: ['**/*.js', '**/*.mjs'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'script',
parser: babelParser,
parserOptions: {
requireConfigFile: false,
ecmaFeatures: {
globalReturn: false,
},
},
globals: {
...globals.browser,
...globals.node,
...globals.jest,
...globals.jquery,
// Add specific Music Blocks globals if needed
Logo: 'readonly',
Blocks: 'readonly',
Turtles: 'readonly',
Activity: 'readonly',
_: 'readonly', // i18n
},
},
rules: {
'no-console': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'prefer-const': 'off',
'no-undef': 'off',
'no-redeclare': 'off',
'semi': ['error', 'always'],
'no-duplicate-case': 'error',
'no-irregular-whitespace': 'warn',
'no-prototype-builtins': 'off',
'no-useless-escape': 'off',
'no-inner-declarations': 'off',
'no-constant-assign': 'off',
'no-const-assign': 'off',
'no-dupe-keys': 'off',
'no-useless-catch': 'off',
'no-loss-of-precision': 'off',
},
},
];