From 4929d2216a3f2d4dfb37b529a2499b5ff6d5bd48 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Sun, 30 Mar 2025 14:15:55 +0100 Subject: Created standard lightscale eslint config --- index.js | 42 ++++++++++++++++++++++++++++++++++++++++++ package.json | 9 +++++++++ 2 files changed, 51 insertions(+) create mode 100644 index.js create mode 100644 package.json diff --git a/index.js b/index.js new file mode 100644 index 0000000..a76dadc --- /dev/null +++ b/index.js @@ -0,0 +1,42 @@ +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, + }, + 'ecmaVersion': 2017, + 'sourceType': 'module', + 'requireConfigFile': false, + }, + 'plugins': [], + 'settings': { + 'import/core-modules': [], + 'import/ignore': [ + 'node_modules', + '\\.(coffee|scss|css|less|hbs|svg|json)$', + ] + }, + 'rules': { + 'no-console': 0, + 'quotes': ['error', 'single'], + 'semi': ['warn', 'always'], + 'comma-dangle': 0, + }, +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..d34cf1c --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "name": "@lightscale/eslint-config", + "version": "1.0.0", + "description": "", + "license": "MIT", + "author": "Sam Light ", + "type": "module", + "main": "index.js" +} -- cgit v1.2.3