node eslint
$ npm install eslint --save-dev
$ ./node_modules/.bin/eslint --init// package.json
"devDependencies": {
"eslint": "^7.2.0",
"eslint-plugin-node": "^11.1.0"
}
// .eslintrc.json
{
"extends": [
"eslint:recommended",
"plugin:node/recommended"
],
"parserOptions": {
// Only ESLint 6.2.0 and later support ES2020.
"ecmaVersion": 2020
},
"rules": {
"node/exports-style": ["error", "module.exports"],
"node/file-extension-in-import": ["error", "always"],
"node/prefer-global/buffer": ["error", "always"],
"node/prefer-global/console": ["error", "always"],
"node/prefer-global/process": ["error", "always"],
"node/prefer-global/url-search-params": ["error", "always"],
"node/prefer-global/url": ["error", "always"],
"node/prefer-promises/dns": "error",
"node/prefer-promises/fs": "error"
}
}"lint": "eslint back/*.js && eslint backTest/*.js && eslint front/actions/*.js"
Also in JavaScript:
- how to convert a number to a string in javascript
- js ask before close chrome
- Angularjs datetime
- const userMessage Reaction = new UserMessage Reaction({ _id: mongoose.Types.ObjectId(), userId: "USERID", userName: "TESTUSERNAME", messageId: "TESTMESSAGEID", time: "TESTTIME" });
- javascript create array of objects with key
- how to pass dynamic string in string javascript
- react native function
- jquery find selected option by class
- javascript text new line
- biden trump javascript real time election
- chroma js contrast check
- split string javascript
- sum javascript
- es6 compare two arrays
- pass array to function javascript
- javascript read file lines into array vanilla
- random int from interval javascript
- open popup in angular
- pass element from child to parent react
- setinterval javascript
- javascript refresh page
- javascript in jsx
- You are running Node 8.10.0. Create React App requires Node 10 or higher. Please update your version of Node.
- how to go back one directory in git bash