Skip to content

Commit

Permalink
Eslint update (#1906)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmod authored Sep 27, 2024
1 parent 4f656fd commit 44c41a1
Show file tree
Hide file tree
Showing 16 changed files with 629 additions and 205 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

21 changes: 0 additions & 21 deletions .eslintrc

This file was deleted.

34 changes: 34 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import globals from 'globals';
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 [
...compat.extends('eslint:recommended', 'plugin:prettier/recommended'),
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.serviceworker,
...globals.webextensions,
__PLATFORM__: 'readonly',
},

ecmaVersion: 'latest',
sourceType: 'module',
},
},
{
ignores: ['/src/rule_resources*'],
},
];
Loading

0 comments on commit 44c41a1

Please sign in to comment.