-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.mjs
More file actions
69 lines (59 loc) · 1.96 KB
/
eslint.config.mjs
File metadata and controls
69 lines (59 loc) · 1.96 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
// Copyright 2024, University of Colorado Boulder
/**
* ESLint configuration for rosetta.
*
* @author Sam Reid (PhET Interactive Simulations)
* @author Michael Kauzmann (PhET Interactive Simulations)
*/
import nodeEslintConfig from '../perennial-alias/js/eslint/config/node.eslint.config.mjs';
export default [
...nodeEslintConfig,
{
rules: {
'phet/bad-sim-text': 'off',
'require-atomic-updates': [
'error',
{ allowProperties: true }
],
'phet/default-import-match-filename': 'off',
// This rule doesn't apply to Rosetta.
// See https://github.com/phetsims/phet-core/issues/100 for paper trail.
'phet/default-export-class-should-register-namespace': 'off',
'@typescript-eslint/consistent-indexed-object-style': 'off',
'phet/no-object-spread-on-non-literals': 'off',
// It isn't clear that rosetta wants to use perennial's node modules via npm-dependencies/. If this isn't true,
// please see https://github.com/phetsims/perennial/issues/372 and fix in rosetta.
'no-restricted-imports': 'off',
'no-void': 'off',
// Rosetta imports a lot of css and svg files
'phet/import-statement-extension': 'off'
}
}, {
// Separate block so that we globally ignore this
ignores: [
'static/*'
]
},
// Folder-specific overrides
{
files: [ 'src/client/**/*.{ts,tsx}' ],
rules: {
'jsx-quotes': [
'error',
'prefer-single'
],
'phet/default-import-match-filename': 'off',
'react/no-unescaped-entities': 'off',
'react/prop-types': 'off',
'phet/import-statement-extension': 'off',
// It isn't clear that rosetta wants to use perennial's node modules via npm-dependencies/. If this isn't true,
// please see https://github.com/phetsims/perennial/issues/372 and fix in rosetta.
'no-restricted-imports': 'off'
},
settings: {
react: {
version: 'detect'
}
}
}
];