Skip to content

Commit

Permalink
Merge pull request #28 from playcanvas/chore-fix-eslint-ignore
Browse files Browse the repository at this point in the history
Remove program.invalid.js from eslintignore and add it to ignores in …
  • Loading branch information
marklundin authored Jan 23, 2025
2 parents 1c1342c + cc1ec0b commit 7126ba0
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 24 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

19 changes: 0 additions & 19 deletions .eslintrc

This file was deleted.

35 changes: 35 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import playcanvasConfig from '@playcanvas/eslint-config';
import globals from 'globals';

export default [
...playcanvasConfig,
{
ignores: ['**/program.invalid.js'] // Exclude specific files
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
...globals.mocha,
...globals.node
}
}
},
{
rules: {
'no-unused-expressions': 'off',
'jsdoc/check-tag-names': 'off',
'import/no-unresolved': 'off'
}
},
{
// Configuration specific to test files
files: ['**/*.test.js'], // Match test files

rules: {
'prefer-arrow-callback': 'off' // Allow function expressions in test files
}
}
];
4 changes: 2 additions & 2 deletions src/utils/tag-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ export function parseTag(input = '') {
try {
const arr = parseStringToNumericalArray(input);
if (Array.isArray(arr)) return arr;
} catch { /* eslint-disable-next-line no-empty */ }
} catch { }

try {
const arr = JSON.parse(input);
if (Array.isArray(arr)) return arr;
} catch { /* eslint-disable-next-line no-empty */ }
} catch { }

// If none of the above, return the string
return input;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/ts-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import * as ts from 'typescript';
import { ParsingError } from '../parsers/parsing-error.js';

export function createDefaultMapFromCDN(options, prefix, ts) {
var fsMap = new Map();
var files = knownLibFilesForCompilerOptions(options, ts);
const fsMap = new Map();
const files = knownLibFilesForCompilerOptions(options, ts);

async function uncached() {
const contentPromises = files.map((lib) => {
Expand Down

0 comments on commit 7126ba0

Please sign in to comment.