From 03e95e916585fb9d1d6b23b6c8af3813df6c260c Mon Sep 17 00:00:00 2001 From: "caleb.mabry.15@cnu.edu" Date: Sat, 5 Mar 2022 22:05:02 -0500 Subject: Add ESLINT --- .eslintrc.js | 35 ++++++++++++++--------------------- package.json | 6 +++++- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3cd51ec..83d8348 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,22 +1,15 @@ module.exports = { - "env": { - "browser": true, - "es6": true, - "jquery": true - }, - "extends": "eslint:recommended", - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly" - }, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "rules": { - "no-console": "off", - "no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], - "eqeqeq": ["error", "smart"], - "semi": ["error", "always"] - } -}; \ No newline at end of file + env: { + browser: true, + es2021: true, + }, + extends: [ + 'airbnb-base', + ], + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + }, + rules: { + }, +}; diff --git a/package.json b/package.json index 0b7aae2..f8908ea 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,9 @@ "deploy": "cross-env NODE_ENV=production webpack -p", "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack --config webpack.config.js", - "start": "webpack-dev-server --config webpack.config.js" + "start": "webpack-dev-server --config webpack.config.js", + "lint": "eslint . --ext .js", + "lint:fix": "eslint --fix . --ext .js" }, "repository": { "type": "git", @@ -25,6 +27,8 @@ "@babel/preset-env": "^7.16.11", "babel-loader": "^8.2.3", "eslint": "^8.10.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.25.4", "webpack": "^5.69.1", "webpack-cli": "^4.9.2" }, -- cgit