diff options
| author | caleb.mabry.15@cnu.edu <caleb.mabry.15@cnu.edu> | 2022-03-05 22:05:02 -0500 |
|---|---|---|
| committer | caleb.mabry.15@cnu.edu <caleb.mabry.15@cnu.edu> | 2022-03-05 22:05:02 -0500 |
| commit | 03e95e916585fb9d1d6b23b6c8af3813df6c260c (patch) | |
| tree | bad570ba05d26c6b69fef2849dd84572fd454998 | |
| parent | 9555d47a0b904c997625fe171f865cd6b6fb29d7 (diff) | |
Add ESLINT
| -rw-r--r-- | .eslintrc.js | 35 | ||||
| -rw-r--r-- | 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" }, |
