diff --git a/.eslintrc.json b/.eslintrc.json index 7a9a8f1431..d6efa4afee 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -54,7 +54,13 @@ "react-hooks/exhaustive-deps": "off", "array-callback-return": "off", "prefer-spread": "off", - "indent": ["error", 2] + "indent": ["error", 2], + "keyword-spacing": ["error", { "after": true, "before": true }], + "array-bracket-spacing": ["error", "never"], + "object-curly-spacing": ["error", "always", { "arraysInObjects": false }], + "no-trailing-spaces": "error", + "no-multi-spaces": "error", + "no-multiple-empty-lines": ["error" , { "max": 1}] } }, { diff --git a/apps/circuit-compiler/project.json b/apps/circuit-compiler/project.json index a8efde346c..1e3753d307 100644 --- a/apps/circuit-compiler/project.json +++ b/apps/circuit-compiler/project.json @@ -35,6 +35,14 @@ } } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/circuit-compiler/**/*.ts"], + "eslintConfig": "apps/circuit-compiler/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/apps/debugger/project.json b/apps/debugger/project.json index 3426f35d13..aaaf9b10bd 100644 --- a/apps/debugger/project.json +++ b/apps/debugger/project.json @@ -40,6 +40,14 @@ } } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/debugger/**/*.ts"], + "eslintConfig": "apps/debugger/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/apps/doc-gen/project.json b/apps/doc-gen/project.json index 4b997606a5..d074969ae4 100644 --- a/apps/doc-gen/project.json +++ b/apps/doc-gen/project.json @@ -38,6 +38,14 @@ } } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/doc-gen/**/*.ts"], + "eslintConfig": "apps/doc-gen/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/apps/doc-viewer/project.json b/apps/doc-viewer/project.json index 2e5455cc30..9289f16886 100644 --- a/apps/doc-viewer/project.json +++ b/apps/doc-viewer/project.json @@ -38,6 +38,14 @@ } } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/doc-viewer/**/*.ts"], + "eslintConfig": "apps/doc-viewer/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/apps/etherscan/project.json b/apps/etherscan/project.json index fe53c7f39e..6803ffe20b 100644 --- a/apps/etherscan/project.json +++ b/apps/etherscan/project.json @@ -38,6 +38,14 @@ } } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/etherscan/**/*.ts"], + "eslintConfig": "apps/etherscan/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/apps/learneth/project.json b/apps/learneth/project.json index a4db7488a7..cafdc12eb9 100644 --- a/apps/learneth/project.json +++ b/apps/learneth/project.json @@ -35,6 +35,14 @@ } } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/learneth/**/*.ts"], + "eslintConfig": "apps/learneth/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/apps/solhint/project.json b/apps/solhint/project.json index dbd4bdce84..c8d6075771 100644 --- a/apps/solhint/project.json +++ b/apps/solhint/project.json @@ -47,6 +47,14 @@ "parallel": false } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/solhint/**/*.ts"], + "eslintConfig": "apps/solhint/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/apps/solidity-compiler/project.json b/apps/solidity-compiler/project.json index 395ec9e94e..876c5f83bf 100644 --- a/apps/solidity-compiler/project.json +++ b/apps/solidity-compiler/project.json @@ -41,6 +41,14 @@ } } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/solidity-compiler/**/*.ts"], + "eslintConfig": "apps/solidity-compiler/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/apps/vyper/project.json b/apps/vyper/project.json index 543c0873fd..859801c47a 100644 --- a/apps/vyper/project.json +++ b/apps/vyper/project.json @@ -38,6 +38,14 @@ } } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/vyper/**/*.ts"], + "eslintConfig": "apps/vyper/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/apps/walletconnect/project.json b/apps/walletconnect/project.json index b8baae9b60..668a31c1d3 100644 --- a/apps/walletconnect/project.json +++ b/apps/walletconnect/project.json @@ -35,6 +35,14 @@ } } }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/walletconnect/**/*.ts"], + "eslintConfig": "apps/walletconnect/.eslintrc" + } + }, "serve": { "executor": "@nrwl/webpack:dev-server", "defaultConfiguration": "development", diff --git a/libs/ghaction-helper/project.json b/libs/ghaction-helper/project.json index 9d93dfcab8..26e659e41d 100644 --- a/libs/ghaction-helper/project.json +++ b/libs/ghaction-helper/project.json @@ -22,7 +22,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/ghaction-helper/**/*.ts"] + "lintFilePatterns": ["libs/ghaction-helper/**/*.ts"], + "eslintConfig": "libs/ghaction-helper/.eslintrc" } } }, diff --git a/libs/remix-analyzer/project.json b/libs/remix-analyzer/project.json index 6700532bb1..0afd267977 100644 --- a/libs/remix-analyzer/project.json +++ b/libs/remix-analyzer/project.json @@ -25,7 +25,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remix-analyzer/**/*.ts"] + "lintFilePatterns": ["libs/remix-analyzer/**/*.ts"], + "eslintConfig": "libs/remix-analyzer/.eslintrc" } } }, diff --git a/libs/remix-astwalker/project.json b/libs/remix-astwalker/project.json index ba70ffc27d..a5f9f364d8 100644 --- a/libs/remix-astwalker/project.json +++ b/libs/remix-astwalker/project.json @@ -24,7 +24,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remix-astwalker/**/*.ts"] + "lintFilePatterns": ["libs/remix-astwalker/**/*.ts"], + "eslintConfig": "libs/remix-astwalker/.eslintrc" } } }, diff --git a/libs/remix-core-plugin/project.json b/libs/remix-core-plugin/project.json index f7d0ab2428..63e5359f06 100644 --- a/libs/remix-core-plugin/project.json +++ b/libs/remix-core-plugin/project.json @@ -19,7 +19,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remix-core-plugin/**/*.ts"] + "lintFilePatterns": ["libs/remix-core-plugin/**/*.ts"], + "eslintConfig": "libs/remix-core-plugin/.eslintrc" } } }, diff --git a/libs/remix-debug/project.json b/libs/remix-debug/project.json index 2f67c8b8cb..8db5345b74 100644 --- a/libs/remix-debug/project.json +++ b/libs/remix-debug/project.json @@ -34,7 +34,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remix-debug/**/*.ts"] + "lintFilePatterns": ["libs/remix-debug/**/*.ts"], + "eslintConfig": "libs/remix-debug/.eslintrc" } } }, diff --git a/libs/remix-lib/project.json b/libs/remix-lib/project.json index 6b5d30f821..956af2b667 100644 --- a/libs/remix-lib/project.json +++ b/libs/remix-lib/project.json @@ -21,7 +21,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remix-lib/**/*.ts"] + "lintFilePatterns": ["libs/remix-lib/**/*.ts"], + "eslintConfig": "libs/remix-lib/.eslintrc" } } }, diff --git a/libs/remix-simulator/project.json b/libs/remix-simulator/project.json index b4aa8b3007..e7aa4885df 100644 --- a/libs/remix-simulator/project.json +++ b/libs/remix-simulator/project.json @@ -33,7 +33,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remix-simulator/**/*.ts"] + "lintFilePatterns": ["libs/remix-simulator/**/*.ts"], + "eslintConfig": "libs/remix-simulator/.eslintrc" } } }, diff --git a/libs/remix-solidity/project.json b/libs/remix-solidity/project.json index 71785eb335..e0a9edd436 100644 --- a/libs/remix-solidity/project.json +++ b/libs/remix-solidity/project.json @@ -24,7 +24,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remix-solidity/**/*.ts"] + "lintFilePatterns": ["libs/remix-solidity/**/*.ts"], + "eslintConfig": "libs/remix-solidity/.eslintrc" } } }, diff --git a/libs/remix-tests/project.json b/libs/remix-tests/project.json index e2e4741e35..dd29dafdde 100644 --- a/libs/remix-tests/project.json +++ b/libs/remix-tests/project.json @@ -41,7 +41,8 @@ "options": { "lintFilePatterns": [ "libs/remix-tests/**/*.ts" - ] + ], + "eslintConfig": "libs/remix-tests/.eslintrc" } } }, diff --git a/libs/remix-url-resolver/project.json b/libs/remix-url-resolver/project.json index 5bd43c8a61..cfe894b3ca 100644 --- a/libs/remix-url-resolver/project.json +++ b/libs/remix-url-resolver/project.json @@ -23,7 +23,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remix-url-resolver/**/*.ts"] + "lintFilePatterns": ["libs/remix-url-resolver/**/*.ts"], + "eslintConfig": "libs/remix-url-resolver/.eslintrc" } } }, diff --git a/libs/remix-ws-templates/project.json b/libs/remix-ws-templates/project.json index 7ebf0408d5..5835378d9c 100644 --- a/libs/remix-ws-templates/project.json +++ b/libs/remix-ws-templates/project.json @@ -40,7 +40,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remix-ws-templates/**/*.ts"] + "lintFilePatterns": ["libs/remix-ws-templates/**/*.ts"], + "eslintConfig": "libs/remix-ws-templates/.eslintrc" } } }, diff --git a/libs/remixd/project.json b/libs/remixd/project.json index b4da03d85f..ac783b5aff 100644 --- a/libs/remixd/project.json +++ b/libs/remixd/project.json @@ -24,7 +24,8 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/remixd/**/*.ts"] + "lintFilePatterns": ["libs/remixd/**/*.ts"], + "eslintConfig": "libs/remixd/.eslintrc" } } }, diff --git a/lintpr.sh b/lintpr.sh new file mode 100644 index 0000000000..38f60e3338 --- /dev/null +++ b/lintpr.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Find all project.json files in subdirectories +find . -type d -name 'node_modules' -prune -o -name '.eslintrc' -print | while read -r file; do + # Extract the directory path of the file + dir=$(dirname "$file") + + + + echo $file + + git checkout master -- $file + +done