Skip to content

Commit

Permalink
Upgrade deps and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrasser committed Oct 25, 2024
1 parent e4b161a commit a264d23
Show file tree
Hide file tree
Showing 17 changed files with 1,841 additions and 2,082 deletions.
12 changes: 0 additions & 12 deletions .eslintignore

This file was deleted.

34 changes: 0 additions & 34 deletions .eslintrc

This file was deleted.

71 changes: 71 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import mocha from 'eslint-plugin-mocha';
import babel from '@babel/eslint-plugin';
import globals from 'globals';
import babelParser from '@babel/eslint-parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: [
'**/.DS_Store',
'**/_sass',
'**/_site',
'**/coverage',
'dist/*',
'**/node_modules',
'**/package-lock.json',
'packages/*/dist/*',
'**/.env',
'**/.env.*',
'!**/.env.example',
],
}, ...compat.extends('eslint:recommended', 'plugin:mocha/recommended'), {
plugins: {
mocha,
'@babel': babel,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.jquery,
...globals.amd,
...globals.mocha,
__base: false,
expect: false,
},

parser: babelParser,
ecmaVersion: 6,
sourceType: 'module',

parserOptions: {
requireConfigFile: false,
},
},

rules: {
curly: 2,
eqeqeq: ['error', 'smart'],
quotes: [2, 'single', 'avoid-escape'],
semi: 2,

'no-unused-vars': ['error', {
caughtErrors: 'none',
varsIgnorePattern: 'should|expect',
}],

'mocha/no-mocha-arrows': 0,
},
}];
Loading

0 comments on commit a264d23

Please sign in to comment.