From 2adc23f0ac9711df9f3aac77a925e7f61a0a4ad5 Mon Sep 17 00:00:00 2001 From: Alex Corn Date: Thu, 29 Jul 2021 02:30:41 -0400 Subject: [PATCH] Added eslint config --- .eslintrc.js | 23 +++++++++++ .idea/codeStyles/Project.xml | 43 ++++++++++++++++---- .idea/codeStyles/codeStyleConfig.xml | 2 +- .idea/inspectionProfiles/Project_Default.xml | 1 + package.json | 3 ++ 5 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..935b7c3 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,23 @@ +module.exports = { + env: { + commonjs: true, + es2021: true, + node: true + }, + extends: 'eslint:recommended', + parserOptions: { + ecmaVersion: 12 + }, + rules: { + // Use tabs for indentation + indent: ['error', 'tab'], + // Single quotes for strings + quotes: ['warn', 'single'], + // Always require semicolons + semi: ['error', 'always'], + // Don't use 'var' + 'no-var': 'warn', + // Only use quotes in object literal keys as needed + 'quote-props': ['warn', 'as-needed'] + } +}; diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index ea198ab..a2ad752 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,18 +1,45 @@ - - - - + - - + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml index a55e7a1..79ee123 100644 --- a/.idea/codeStyles/codeStyleConfig.xml +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -1,5 +1,5 @@ - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 2d5fea6..1c13055 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -4,6 +4,7 @@ + diff --git a/package.json b/package.json index bebf399..b483c1e 100644 --- a/package.json +++ b/package.json @@ -33,5 +33,8 @@ }, "engines": { "node": ">=8.0.0" + }, + "devDependencies": { + "eslint": "^7.31.0" } }