Skip to content

Commit

Permalink
Add rules for would-be client-side files.
Browse files Browse the repository at this point in the history
There aren't any yet, but I suspect we'll end up with some at some point.
  • Loading branch information
danfuzz committed Aug 11, 2024
1 parent e456b8f commit 012361b
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,7 @@ export default [
{
languageOptions: {
ecmaVersion: 2024,
globals: {
...globals.node,
...globals.es2024
}
globals: globals.node
},
plugins: {
'jsdoc': jsdocPlugin,
Expand All @@ -330,6 +327,7 @@ export default [
{
files: ['**/*.{js,mjs,cjs}'],
ignores: [
'**/assets/**/*.{js,mjs,cjs}',
'**/export/testing/**/*.{js,mjs,cjs}',
'**/tests/**/*.test.{js,mjs,cjs}',
'**/*.config.{js,mjs,cjs}'
Expand Down Expand Up @@ -371,5 +369,18 @@ export default [
'jest/no-disabled-tests': 'error',
'jest/no-focused-tests': 'error' // That is, no `.only...`.
}
},

// Client (browser) files.
{
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser
},
files: ['**/assets/**/*.{js,mjs,cjs}'],
rules: {
...disallowedFunctionalityNonTesting,
'no-alert': 'off' // TODO: Should be disallowed, ultimately.
}
}
];

0 comments on commit 012361b

Please sign in to comment.