From bca1648df6a03370fc071c1723f504cc146e8b16 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Mon, 14 Mar 2022 11:34:58 +0530 Subject: [PATCH] Move plugin to /scripts and create eslintrc --- .eslintrc.js | 1 - package.json | 2 +- scripts/.eslintrc.js | 18 ++++++++++++++++++ {postcss => scripts/postcss}/color.js | 0 .../postcss}/css-compile-variables.js | 0 {postcss => scripts/postcss}/test.js | 0 6 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 scripts/.eslintrc.js rename {postcss => scripts/postcss}/color.js (100%) rename {postcss => scripts/postcss}/css-compile-variables.js (100%) rename {postcss => scripts/postcss}/test.js (100%) diff --git a/.eslintrc.js b/.eslintrc.js index 1985ccc1..cb28f4c8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,6 @@ module.exports = { "env": { "browser": true, - "node": true, "es6": true }, "extends": "eslint:recommended", diff --git a/package.json b/package.json index fa9c4344..12c73994 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "lint-ts": "eslint src/ -c .ts-eslintrc.js --ext .ts", "lint-ci": "eslint src/", "test": "impunity --entry-point src/platform/web/main.js src/platform/web/Platform.js --force-esm-dirs lib/ src/ --root-dir src/", - "test:postcss": "impunity --entry-point postcss/test.js ", + "test:postcss": "impunity --entry-point scripts/postcss/test.js ", "start": "vite --port 3000", "build": "vite build", "build:sdk": "./scripts/sdk/build.sh" diff --git a/scripts/.eslintrc.js b/scripts/.eslintrc.js new file mode 100644 index 00000000..1cdfca84 --- /dev/null +++ b/scripts/.eslintrc.js @@ -0,0 +1,18 @@ +module.exports = { + "env": { + "node": true, + "es6": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + }, + "rules": { + "no-console": "off", + "no-empty": "off", + "no-prototype-builtins": "off", + "no-unused-vars": "warn" + }, +}; + diff --git a/postcss/color.js b/scripts/postcss/color.js similarity index 100% rename from postcss/color.js rename to scripts/postcss/color.js diff --git a/postcss/css-compile-variables.js b/scripts/postcss/css-compile-variables.js similarity index 100% rename from postcss/css-compile-variables.js rename to scripts/postcss/css-compile-variables.js diff --git a/postcss/test.js b/scripts/postcss/test.js similarity index 100% rename from postcss/test.js rename to scripts/postcss/test.js