Last active
July 20, 2022 12:43
-
-
Save andymantell/058288dc66f657268e332cfc2dd6b136 to your computer and use it in GitHub Desktop.
my prettier / eslint setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/* | |
dist/* | |
bin/* | |
obj/* | |
Properties/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
extends: ["airbnb-base/legacy", "plugin:prettier/recommended"], | |
parser: "@babel/eslint-parser", | |
parserOptions: { | |
requireConfigFile: false, | |
}, | |
env: { | |
browser: true, | |
node: true, | |
jquery: true, | |
es6: true, | |
jest: true, | |
}, | |
rules: { | |
"no-console": 0, | |
"prettier/prettier": [ | |
"error", | |
{ | |
endOfLine: "auto", | |
}, | |
], | |
"no-unused-vars": [ | |
"error", | |
{ | |
argsIgnorePattern: "resolve|reject|err", | |
}, | |
], | |
"no-plusplus": 0, | |
"no-underscore-dangle": 0, | |
"no-param-reassign": 0, | |
}, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"lint": "eslint .", | |
"lint:fix": "eslint . --fix" | |
}, | |
"dependencies": { | |
"@babel/eslint-parser": "^7.17.0", | |
"eslint": "^8.14.0", | |
"eslint-config-airbnb-base": "^15.0.0", | |
"eslint-config-prettier": "^8.5.0", | |
"eslint-plugin-prettier": "^4.0.0", | |
"prettier": "^2.6.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Obviously the package.json is truncated, to only show the relevant bits