Skip to content

Commit

Permalink
Update eslint to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
StorytellerCZ committed Jul 16, 2024
1 parent 3ccb1a4 commit c5d9308
Show file tree
Hide file tree
Showing 7 changed files with 485 additions and 593 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

34 changes: 0 additions & 34 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Add newer Meteor versions to `versionsFrom`
* Minimum Meteor version is 2.8.1
* Updated for Meteor 3
* Updated to eslint v9

## v1.1.0

Expand Down
43 changes: 43 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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: ["node_modules/*", "packages/*", "**/phantom_runner.js", "**/start_test.js", "**/eslint.config.mjs"],
}, ...compat.extends("eslint:recommended"), {
languageOptions: {
globals: {
...globals.node,
...globals.commonjs,
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},

parser: babelParser,
ecmaVersion: 2018,
sourceType: "module",

parserOptions: {
allowImportExportEverywhere: true,
requireConfigFile: false,
},
},

rules: {
"linebreak-style": ["error", "unix"],
quotes: ["error", "single"],
semi: ["error", "always"],
"no-console": "off",
},
}];
Loading

0 comments on commit c5d9308

Please sign in to comment.