From ca351a9c63bb52bf90322340b84fdb4612db67ec Mon Sep 17 00:00:00 2001 From: Sam Light Date: Sun, 30 Mar 2025 15:54:18 +0100 Subject: Updated config --- index.js | 57 ++++++++++++++++++++++----------------------------------- 1 file changed, 22 insertions(+), 35 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index a76dadc..82bcdf7 100644 --- a/index.js +++ b/index.js @@ -1,42 +1,29 @@ +import babelParser from '@babel/eslint-parser'; +import globals from 'globals'; + export default { - 'root': true, - 'extends': [ - 'eslint:recommended' - ], - 'globals': { - 'wp': true, - }, - 'env': { - 'node': true, - 'es6': true, - 'amd': true, - 'browser': true, - 'jquery': true, - }, - 'parser': '@babel/eslint-parser', - 'parserOptions': { - 'ecmaFeatures': { - 'globalReturn': true, - 'generators': false, - 'objectLiteralDuplicateProperties': false, - 'experimentalObjectRestSpread': true, + languageOptions: { + globals: { + ...globals.browser + }, + parser: babelParser, + parserOptions: { + ecmaFeatures: { + globalReturn: true, + generators: false, + objectLiteralDuplicateProperties: false, + experimentalObjectRestSpread: true, + }, + ecmaVersion: 2017, + sourceType: 'module', + requireConfigFile: false, }, - 'ecmaVersion': 2017, - 'sourceType': 'module', - 'requireConfigFile': false, - }, - 'plugins': [], - 'settings': { - 'import/core-modules': [], - 'import/ignore': [ - 'node_modules', - '\\.(coffee|scss|css|less|hbs|svg|json)$', - ] }, - 'rules': { + + rules: { 'no-console': 0, - 'quotes': ['error', 'single'], - 'semi': ['warn', 'always'], + quotes: ['error', 'single'], + semi: ['warn', 'always'], 'comma-dangle': 0, }, }; -- cgit v1.2.3