├── .editorconfig ├── .eslintrc ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── configurations ├── airbnb │ ├── es5.js │ ├── es6-react.js │ └── es6.js ├── eslint.js ├── google.js ├── gulp.js ├── node-runtime.js ├── off.js └── walmart │ ├── es5-browser.js │ ├── es5-node.js │ ├── es5-test.js │ ├── es5.js │ ├── es6-browser.js │ ├── es6-node.js │ ├── es6-react-test.js │ ├── es6-react.js │ ├── es6-test.js │ └── es6.js ├── package.json └── rules ├── eslint ├── best-practices │ ├── airbnb.js │ ├── eslint.js │ ├── google.js │ ├── gulp.js │ ├── node-runtime.js │ ├── off.js │ └── walmart.js ├── errors │ ├── airbnb.js │ ├── eslint.js │ ├── google.js │ ├── gulp.js │ ├── node-runtime.js │ ├── off.js │ └── walmart.js ├── es6 │ ├── airbnb.js │ ├── eslint.js │ ├── google.js │ ├── gulp.js │ ├── node-runtime.js │ ├── off.js │ └── walmart.js ├── node │ ├── airbnb.js │ ├── eslint.js │ ├── google.js │ ├── gulp.js │ ├── node-runtime.js │ ├── off.js │ └── walmart.js ├── strict │ ├── airbnb.js │ ├── eslint.js │ ├── google.js │ ├── gulp.js │ ├── node-runtime.js │ ├── off.js │ └── walmart.js ├── style │ ├── airbnb.js │ ├── eslint.js │ ├── google.js │ ├── gulp.js │ ├── node-runtime.js │ ├── off.js │ └── walmart.js └── variables │ ├── airbnb.js │ ├── eslint.js │ ├── google.js │ ├── gulp.js │ ├── node-runtime.js │ ├── off.js │ └── walmart.js ├── filenames ├── off.js └── walmart.js └── react ├── airbnb.js ├── off.js └── walmart.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | --- 2 | extends: 3 | # We're manually approximating `configurations/walmart/es5-node` with these 4 | # _local_ imports (since `defaults/` prefix assumes npm-installed). 5 | - "./rules/eslint/best-practices/walmart.js" 6 | - "./rules/eslint/errors/walmart.js" 7 | - "./rules/eslint/es6/off.js" 8 | - "./rules/eslint/node/off.js" 9 | - "./rules/eslint/strict/walmart.js" 10 | - "./rules/eslint/style/walmart.js" 11 | - "./rules/eslint/variables/walmart.js" 12 | - "./rules/filenames/walmart.js" 13 | - "./rules/eslint/node/walmart.js" 14 | 15 | rules: 16 | "strict": [2, "global"] 17 | "no-magic-numbers": 0 # Magic numbers _define_ the rule settings. 18 | "max-len": 0 # Bias towards comments / rules on _one line_ 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # -------------------- 2 | # OSX Files 3 | # -------------------- 4 | .DS_Store 5 | .AppleDouble 6 | .LSOverride 7 | Icon 8 | ._* 9 | .Spotlight-V100 10 | .Trashes 11 | npm-debug.log* 12 | 13 | # -------------------- 14 | # Sublime Text Files 15 | # -------------------- 16 | *.sublime-project 17 | *.sublime-workspace 18 | 19 | # -------------------- 20 | # IntelliJ Files 21 | # -------------------- 22 | *.iml 23 | *.ipr 24 | *.iws 25 | .idea/ 26 | out/ 27 | 28 | # -------------------- 29 | # Eclipse Files 30 | # -------------------- 31 | .project 32 | .metadata 33 | *.bak 34 | .classpath 35 | .settings 36 | 37 | # -------------------- 38 | # App Files 39 | # -------------------- 40 | node_modules 41 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.10" 5 | - "0.12" 6 | - "4.2" 7 | - "5.0" 8 | 9 | # Use container-based Travis infrastructure. 10 | sudo: false 11 | 12 | branches: 13 | only: 14 | - master 15 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 10.0.0-1 (2016-03-04) 2 | 3 | #### User Facing Changes 4 | 5 | * Replace `no-empty-label` with `no-labels` 6 | * Replace `space-after-keywords`, `space-before-keywords`, `space-return-throw-case` with `keyword-spacing` 7 | * Update devDependency to ESLint 2.x.x 8 | 9 | ## 9.0.0 (2016-02-10) 10 | 11 | #### User Facing Changes 12 | 13 | * Correct bug where walmart/es6-node enabled ecma features that are unsupported in node@4 14 | * Add babel-eslint to the walmart config to enable proper es-next parsing 15 | * Add node-runtime configuration 16 | * Update README to specify what node version it tracks 17 | * Update airbnb congif from 2.1.1 -> 5.0.0 18 | 19 | ## 8.0.2 (2016-01-12) 20 | 21 | #### User Facing Changes 22 | 23 | * Correct bug where eslint/style configs had duplicate keys 24 | 25 | #### Internal Changes 26 | 27 | * Add CI (wooooo! thanks @ryan-roemer) 28 | 29 | ## 8.0.1 (2016-01-08) 30 | 31 | #### User Facing Changes 32 | 33 | * Correct but where react/no-is-mounted was called react/jsx-no-is-mounted 34 | 35 | ## 8.0.0 (2016-01-08) 36 | 37 | #### User Facing Changes 38 | 39 | * Turn on new rules from eslint and eslint-plugin react in Walmart configurations 40 | * Update airbnb config to 2.1.1 41 | * Update all rules for the ESLint 1.10.3 42 | * Update all rules for eslint-plugin-react 3.12.0 43 | 44 | ## 7.1.1 (2015-10-28) 45 | 46 | #### User Facing Changes 47 | 48 | * Update docs to include new walmart config 49 | 50 | ## 7.1.0 (2015-10-28) 51 | 52 | #### User Facing Changes 53 | 54 | * Add walmart/es6-react-test.js 55 | * Update docs for clarity 56 | 57 | ## 7.0.1 (2015-10-02) 58 | 59 | #### User Facing Changes 60 | 61 | * Correct typo in walmart and airbnb config 62 | 63 | ## 7.0.0 (2015-10-01) 64 | 65 | #### User Facing Changes 66 | 67 | * Remove deprecated react/jsx-quotes in favor of jsx-quotes 68 | * Update eslint 1.0.0 -> 1.5.1 69 | * Update eslint-react 3.1.0 -> 3.5.0 70 | * Adds use strict back to best-practices 71 | * Fixes defaults extensibility in configuration files 72 | 73 | ## 6.0.0 (2015-09-01) 74 | 75 | #### Internal Changes 76 | 77 | * Revert 5.0.0 due to a limitation in ESLint 78 | 79 | ## 5.0.0 (2015-08-27) 80 | 81 | #### Internal Changes 82 | 83 | * Convert all js/json to YAML 84 | 85 | ## 4.2.0 (2015-08-19) 86 | 87 | #### User Facing Changes 88 | 89 | * Add Google config 90 | 91 | ## 4.1.1 (2015-08-19) 92 | 93 | #### User Facing Changes 94 | 95 | * Add missing documentation about babel-eslint dependency 96 | 97 | ## 4.1.0 (2015-08-17) 98 | 99 | #### User Facing Changes 100 | 101 | * Add filename enforcement plugin to Walmart configs 102 | 103 | ## 4.0.2 (2015-08-17) 104 | 105 | #### Internal 106 | 107 | * Remove dependency on lodash in place of ESLint's merge 108 | 109 | ## 4.0.1 (2015-08-07) 110 | 111 | #### User Facing Changes 112 | 113 | * Correct missing comma in React config 114 | 115 | ## 4.0.0 (2015-08-07) 116 | 117 | #### User Facing Changes 118 | 119 | * Correct node value in airbnb node config 120 | * Remove environments - they are not generalizable enough to warrant specific config 121 | * Bring up to date with ESLint 1.0.0+ and eslint-plugin-react 3.1.0+ and airbnb 0.0.7 122 | 123 | #### Internal Changes 124 | 125 | * Add attributions and a thank you section 126 | * Small README corrections 127 | * Add comments in base config to delineate plugins from core 128 | 129 | ## 3.1.0 (2015-07-06) 130 | 131 | #### User Facing Changes 132 | 133 | * Turn off react/no-multi-comp in walmart config 134 | 135 | ## 3.0.3 (2015-07-06) 136 | 137 | #### Internal Changes 138 | 139 | * Add missing comma that prevented the strict rules from being loaded 140 | 141 | ## 3.0.2 (2015-07-06) 142 | 143 | #### User Facing Changes 144 | 145 | * Convert README examples to YAML since shared config is broken in JSON 146 | * Add deprecated ESLint config that was on by default. Will be removed at ESLint 1.0 147 | 148 | ## 3.0.1 (2015-07-06) 149 | 150 | #### User Facing Changes 151 | 152 | * Remove `.js` suffix from README configs 153 | 154 | #### Internal Changes 155 | 156 | * Update repo urls 157 | * Correct lint errors in the project 158 | 159 | ## 3.0.0 (2015-07-06) 160 | 161 | #### User Facing Changes 162 | 163 | * Bring config up to date with ESLint 0.24.0 164 | * Add React plugin config 165 | * walmart: Add mocha to es5 test 166 | * walmart: Turn on global strict mode in es6 and es5-node config 167 | * walmart: Turn on all ES6 rules 168 | 169 | #### Internal Changes 170 | 171 | * Correct improper overrides in walmart/test 172 | * Wrap all properties in " for easier transfer from json <-> javascript 173 | * Correct linting errors 174 | 175 | ## 2.1.0 (2015-07-05) 176 | 177 | #### User Facing Changes 178 | 179 | * Correct bug causing walmart configs to fail 180 | * Rename walmart configs for brevity 181 | 182 | ## 2.0.1 (2015-07-05) 183 | 184 | #### Internal Changes 185 | 186 | * Update README for readability 187 | 188 | ## 2.0.0 (2015-07-05) 189 | 190 | #### User Facing Changes 191 | 192 | * Replace "default" config with named configs (airbnb, walmart, eslint) 193 | * Extract environment config into new directory 194 | * Move rules into eslint directory for cleaner addition of plugins 195 | * Add ESLint's default config and set it to the new default 196 | * Add WalmartLabs config 197 | * Add AirBnB config 198 | 199 | #### Internal Changes 200 | 201 | * Update lodash 202 | 203 | ## 1.0.0 (2015-06-25) 204 | 205 | #### User Facing Changes 206 | 207 | * move complete configurations and rulesets into `configurations` and `rules` respectively 208 | * Add missing changelog entries 209 | 210 | #### Internal Changes 211 | 212 | * Lint the lint config 213 | 214 | ## 0.4.0 (2015-06-24) 215 | 216 | #### User Facing Changes 217 | 218 | * Rev non patch version to support the breaking changes from 0.3.6 -> 0.3.7 219 | 220 | ## 0.3.7 (2015-06-24) 221 | 222 | #### User Facing Changes 223 | 224 | * Move config groups into config directory 225 | * Add airbnb style config 226 | 227 | #### Internal Changes 228 | 229 | * Remove js prop access in favor of object merge 230 | * DRY up es6 configs 231 | 232 | ## 0.3.6 (2015-06-17) 233 | 234 | #### User Facing Changes 235 | 236 | * README Updates 237 | 238 | ## 0.3.5 (2015-06-17) 239 | 240 | #### User Facing Changes 241 | 242 | * README Updates 243 | 244 | ## 0.3.4 (2015-06-17) 245 | 246 | #### User Facing Changes 247 | 248 | * Correct bug that caused some configs not to load 249 | 250 | ## 0.3.3 (2015-06-17) 251 | 252 | #### User Facing Changes 253 | 254 | * README Updates 255 | * Correct bug that caused some configs not to load 256 | 257 | ## 0.3.2 (2015-06-17) 258 | 259 | #### User Facing Changes 260 | 261 | * README Updates 262 | 263 | ## 0.3.1 (2015-06-17) 264 | 265 | #### User Facing Changes 266 | 267 | * README Updates 268 | 269 | ## 0.3.0 (2015-06-17) 270 | 271 | #### User Facing Changes 272 | 273 | * Change default to be ES5 274 | * Change ES5 to turn off node and legacy rules 275 | * Create separate ES5 and ES6 config sets 276 | 277 | ## 0.2.0 (2015-06-16) 278 | 279 | #### User Facing Changes 280 | 281 | * Initial Release 282 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Keith Cirkel 4 | 5 | Copyright (c) 2015 Eric Baer 6 | 7 | Copyright (c) 2015 @WalmartLabs 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | *** 2 | # NOTICE: 3 | 4 | ## This repository has been archived and is not supported. 5 | 6 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 7 | *** 8 | NOTICE: SUPPORT FOR THIS PROJECT HAS ENDED 9 | 10 | This projected was owned and maintained by Walmart. This project has reached its end of life and Walmart no longer supports this project. 11 | 12 | We will no longer be monitoring the issues for this project or reviewing pull requests. You are free to continue using this project under the license terms or forks of this project at your own risk. This project is no longer subject to Walmart's bug bounty program or other security monitoring. 13 | 14 | 15 | ## Actions you can take 16 | 17 | We recommend you take the following action: 18 | 19 | * Review any configuration files used for build automation and make appropriate updates to remove or replace this project 20 | * Notify other members of your team and/or organization of this change 21 | * Notify your security team to help you evaluate alternative options 22 | 23 | ## Forking and transition of ownership 24 | 25 | For [security reasons](https://www.theregister.co.uk/2018/11/26/npm_repo_bitcoin_stealer/), Walmart does not transfer the ownership of our primary repos on Github or other platforms to other individuals/organizations. Further, we do not transfer ownership of packages for public package management systems. 26 | 27 | If you would like to fork this package and continue development, you should choose a new name for the project and create your own packages, build automation, etc. 28 | 29 | Please review the licensing terms of this project, which continue to be in effect even after decommission. 30 | 31 | ## This project is DEPRECATED. It has been replaced by more specific projects. 32 | 33 | When I started this project, I wanted `eslint-config-defaults` to be the easiest way to get started with eslint and as a part of that I wanted to have lots of options for people. At the time the `extends` feature was brand new and very few people were using it and some of this config, like Google's was not available in other places. Since then, many many companies including eslint itself began publishing their own `eslint-config-`. I think this project served it’s purpose (promoting eslint and the use of the extention feature) but now we don’t need a one stop shop. This project is no longer maintained. Updated config can be grabbed at the individual project repos. 34 | 35 | * https://github.com/walmartlabs/eslint-config-walmart 36 | * https://github.com/google/eslint-config-google 37 | * https://github.com/airbnb/javascript 38 | * https://github.com/gulpjs/eslint-config-gulp 39 | * https://github.com/FormidableLabs/eslint-config-formidable 40 | 41 | *** 42 | 43 |

eslint-config-defaults

44 | 45 |

46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |

56 | 57 |

58 | A composable set of ESLint configurations. 59 |

60 | 61 | *** 62 | 63 | ## Installation 64 | 65 | Install this config package and ESLint: 66 | 67 | ```bash 68 | $ npm install --save-dev eslint eslint-config-defaults 69 | ``` 70 | 71 | ## Usage 72 | 73 | ### Full Configurations 74 | 75 | This package includes the following complete and ready to use configurations: 76 | 77 | - `defaults` - The config [recommended](https://github.com/eslint/eslint/blob/master/conf/eslint.json) by ESLint 78 | - `defaults/configurations/eslint` - The config [recommended](https://github.com/eslint/eslint/blob/master/conf/eslint.json) by ESLint 79 | - `defaults/configurations/google` - The [Google JavaScript Style Guide](https://google.github.io/styleguide/javascriptguide.xml) 80 | - `defaults/configurations/gulp` - The [Gulp ESLint config](https://github.com/gulpjs/eslint-config-gulp) 81 | - `defaults/configurations/node-runtime` - The config [used for the Node.js runtime](https://github.com/nodejs/node/blob/master/.eslintrc) 82 | - `defaults/configurations/off` - Disable all rules (ESLint's default at 1.0.0+) 83 | - `defaults/configurations/airbnb/es5` - Config from the [AirBnB Style Guide](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) 84 | - `defaults/configurations/airbnb/es6-react` - Config from the [AirBnB Style Guide](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) 85 | - `defaults/configurations/airbnb/es6` - Config from the [AirBnB Style Guide](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) 86 | - `defaults/configurations/walmart/es5-browser` - Walmart ES5 + browser 87 | - `defaults/configurations/walmart/es5-node` - Walmart ES5 + node < 4.x 88 | - `defaults/configurations/walmart/es5-test` - Walmart ES5 + test 89 | - `defaults/configurations/walmart/es5` - Walmart ES5 config 90 | - `defaults/configurations/walmart/es6-browser` - Walmart ES6 + browser 91 | - `defaults/configurations/walmart/es6-node` - Walmart ES6 + node 4.x 92 | - `defaults/configurations/walmart/es6-react-test` - Walmart ES6 + react + test 93 | - `defaults/configurations/walmart/es6-react` - Walmart ES6 + react 94 | - `defaults/configurations/walmart/es6-test` - Walmart ES6 + test 95 | - `defaults/configurations/walmart/es6` - Walmart ES6 config 96 | 97 | ###### Dependencies 98 | 99 | - Any Walmart config (`defaults/configurations/walmart/`) - [eslint-plugin-filenames](https://github.com/selaux/eslint-plugin-filenames) 100 | - Any React config (`-react`) - [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react), [babel-eslint](https://github.com/babel/babel-eslint) 101 | - Any ES-next config (`es6-`) - [babel-eslint](https://github.com/babel/babel-eslint) 102 | 103 | To consume and extend a config in ESLint just add the extends attribute to your `.eslintrc`. For 104 | more details about how shareable configs work, see the 105 | [ESLint documentation](http://eslint.org/docs/developer-guide/shareable-configs). 106 | 107 | ```yaml 108 | --- 109 | "extends": 110 | - "defaults" 111 | ``` 112 | 113 | ```yaml 114 | --- 115 | "extends": 116 | - "defaults/configurations/walmart/es6-browser" 117 | ``` 118 | 119 | **NOTE:** Extending multiple complete configs can cause unexpected results, if you need to do this you should consider a piecemeal config as explained below. See https://github.com/walmartlabs/eslint-config-defaults/issues/38 for details. 120 | 121 | ### Piecemeal Configurations 122 | 123 | ESLint configuration is broken apart in `./rules` containing ESLint's rules and rules for specific ESLint plugins. The full set of ESLint rules (`./rules/eslint`) are broken into categories that mirror ESLint's documentation. Under each rule type there are sets of configuration as well as an `off.js` file which turns off every rule in the category. 124 | 125 | ###### Examples 126 | 127 | ```yaml 128 | --- 129 | "extends": 130 | - "defaults/rules/eslint/best-practices/walmart", 131 | - "defaults/rules/eslint/errors/airbnb" 132 | 133 | - "defaults/rules/eslint/es6/off" 134 | - "defaults/rules/eslint/node/off" 135 | 136 | "env": 137 | "phantom": true 138 | ``` 139 | 140 | ## Limitations 141 | 142 | Due to an issue with ESLint, config extension cannot be called from a globally installed (`npm install -g eslint`) eslint. It can however be run properly using eslint installed directly to your package's `node_modules`. This can be done by either calling it directly (`./node_modules/.bin/eslint .`) or from within an npm script since they automatically check local `node_modules` first. This will be tracked in issue [#43](https://github.com/walmartlabs/eslint-config-defaults/issues/43). 143 | 144 | ### This package tracks config in the following versions: 145 | 146 | - [ESLint](https://github.com/eslint/eslint) 1.10.3 147 | - [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) 3.12.0 148 | - [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb) 5.0.0 149 | - [eslint-config-gulp](https://github.com/gulpjs/eslint-config-gulp) 2.0.0 150 | - [Google JavaScript Style Guide](https://github.com/google/styleguide/tree/43d738ab8bb0c797f78506945729946aacbab17d) 43d738ab8b 151 | - [eslint-plugin-filenames](https://www.npmjs.com/package/eslint-plugin-filenames) 0.2.0 152 | - [Node.js](https://github.com/nodejs/node/tree/a84bf2ce68a1ffd5c09c9ff297a56814cd79923f) a84bf2ce68a1ffd5c09c9ff297a56814cd79923f 153 | 154 | ## And A Special Thanks To 155 | 156 | * [Nicholas C. Zakas](https://github.com/nzakas) for all the amazing work on [ESLint](https://github.com/eslint/eslint) 157 | * [Keith Cirkel](https://github.com/keithamus) for painstakingly formatting all of ESLint's rules into JSON in [eslint-config-strict](https://github.com/keithamus/eslint-config-strict) 158 | * [AirBnB](https://github.com/airbnb/javascript) for sharing all of their config in [JavaScript Style Guide](https://github.com/airbnb/javascript) 159 | * [Google](https://google.github.io/styleguide/javascriptguide.xml) for sharing their styleguide 160 | * [ES-Next Compat Table](https://github.com/kangax/compat-table) for the [excellent docs on node features](https://kangax.github.io/compat-table/es6/#node4) 161 | 162 | *** 163 | 164 | ## License 165 | 166 | [MIT License](http://opensource.org/licenses/MIT) 167 | -------------------------------------------------------------------------------- /configurations/airbnb/es5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/rules/eslint/best-practices/airbnb", 6 | "defaults/rules/eslint/errors/airbnb", 7 | "defaults/rules/eslint/node/airbnb", 8 | "defaults/rules/eslint/strict/airbnb", 9 | "defaults/rules/eslint/style/airbnb", 10 | "defaults/rules/eslint/variables/airbnb" 11 | ], 12 | "parser": "babel-eslint", 13 | "env": { 14 | "browser": true, 15 | "node": true, 16 | "amd": false, 17 | "mocha": false, 18 | "jasmine": false 19 | }, 20 | "ecmaFeatures": {}, 21 | "globals": {}, 22 | "rules": {} 23 | }; 24 | -------------------------------------------------------------------------------- /configurations/airbnb/es6-react.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/configurations/airbnb/es6", 6 | "defaults/rules/react/airbnb" 7 | ] 8 | }; 9 | -------------------------------------------------------------------------------- /configurations/airbnb/es6.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/configurations/airbnb/es5", 6 | "defaults/rules/eslint/es6/airbnb" 7 | ] 8 | }; 9 | -------------------------------------------------------------------------------- /configurations/eslint.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/rules/eslint/best-practices/eslint", 6 | "defaults/rules/eslint/errors/eslint", 7 | "defaults/rules/eslint/es6/eslint", 8 | "defaults/rules/eslint/node/eslint", 9 | "defaults/rules/eslint/strict/eslint", 10 | "defaults/rules/eslint/style/eslint", 11 | "defaults/rules/eslint/variables/eslint" 12 | ], 13 | "parser": "espree", 14 | "env": { 15 | "browser": false, 16 | "node": false, 17 | "amd": false, 18 | "mocha": false, 19 | "jasmine": false 20 | }, 21 | "ecmaFeatures": {}, 22 | "globals": {}, 23 | "rules": {} 24 | }; 25 | -------------------------------------------------------------------------------- /configurations/google.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/rules/eslint/best-practices/google", 6 | "defaults/rules/eslint/errors/google", 7 | "defaults/rules/eslint/es6/google", 8 | "defaults/rules/eslint/node/google", 9 | "defaults/rules/eslint/strict/google", 10 | "defaults/rules/eslint/style/google", 11 | "defaults/rules/eslint/variables/google" 12 | ], 13 | "env": {}, 14 | "ecmaFeatures": {}, 15 | "globals": {}, 16 | "rules": {} 17 | }; 18 | -------------------------------------------------------------------------------- /configurations/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/rules/eslint/best-practices/gulp", 6 | "defaults/rules/eslint/errors/gulp", 7 | "defaults/rules/eslint/es6/gulp", 8 | "defaults/rules/eslint/node/gulp", 9 | "defaults/rules/eslint/strict/gulp", 10 | "defaults/rules/eslint/style/gulp", 11 | "defaults/rules/eslint/variables/gulp" 12 | ], 13 | "env": {}, 14 | "ecmaFeatures": {}, 15 | "globals": {}, 16 | "rules": {} 17 | }; 18 | -------------------------------------------------------------------------------- /configurations/node-runtime.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/rules/eslint/best-practices/node-runtime", 6 | "defaults/rules/eslint/errors/node-runtime", 7 | "defaults/rules/eslint/es6/node-runtime", 8 | "defaults/rules/eslint/node/node-runtime", 9 | "defaults/rules/eslint/strict/node-runtime", 10 | "defaults/rules/eslint/style/node-runtime", 11 | "defaults/rules/eslint/variables/node-runtime" 12 | ], 13 | "env": {}, 14 | "ecmaFeatures": {}, 15 | "globals": {}, 16 | "rules": {} 17 | }; 18 | -------------------------------------------------------------------------------- /configurations/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/rules/eslint/best-practices/off", 6 | "defaults/rules/eslint/errors/off", 7 | "defaults/rules/eslint/es6/off", 8 | "defaults/rules/eslint/node/off", 9 | "defaults/rules/eslint/strict/off", 10 | "defaults/rules/eslint/style/off", 11 | "defaults/rules/eslint/variables/off" 12 | ], 13 | "env": {}, 14 | "ecmaFeatures": {}, 15 | "globals": {}, 16 | "rules": {} 17 | }; 18 | -------------------------------------------------------------------------------- /configurations/walmart/es5-browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": "defaults/configurations/walmart/es5", 5 | "env": { 6 | "browser": true 7 | } 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /configurations/walmart/es5-node.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/configurations/walmart/es5", 6 | "defaults/rules/eslint/node/walmart" 7 | ], 8 | "rules": { 9 | "strict": [2, "global"] 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /configurations/walmart/es5-test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/configurations/walmart/es5" 6 | ], 7 | "env": { 8 | "mocha": true 9 | }, 10 | "rules": { 11 | "max-nested-callbacks": 0 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /configurations/walmart/es5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/rules/eslint/best-practices/walmart", 6 | "defaults/rules/eslint/errors/walmart", 7 | "defaults/rules/eslint/es6/off", 8 | "defaults/rules/eslint/node/off", 9 | "defaults/rules/eslint/strict/walmart", 10 | "defaults/rules/eslint/style/walmart", 11 | "defaults/rules/eslint/variables/walmart", 12 | "defaults/rules/filenames/walmart" 13 | ], 14 | "env": {}, 15 | "ecmaFeatures": {}, 16 | "globals": { 17 | "require": false, 18 | "module": false, 19 | "process": false 20 | }, 21 | "rules": {} 22 | }; 23 | -------------------------------------------------------------------------------- /configurations/walmart/es6-browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": "defaults/configurations/walmart/es6", 5 | 6 | "env": { 7 | "browser": true 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /configurations/walmart/es6-node.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/configurations/walmart/es6", 6 | "defaults/rules/eslint/node/walmart" 7 | ], 8 | "ecmaFeatures": { 9 | // Enable arrow functions 10 | "arrowFunctions": true, 11 | // Enable binary literals 12 | "binaryLiterals": true, 13 | // Enable let and const (aka block bindings) 14 | "blockBindings": true, 15 | // Enable classes 16 | "classes": false, 17 | // Enable default function parameters 18 | "defaultParams": false, 19 | // Enable destructuring 20 | "destructuring": false, 21 | // Enable for-of loops 22 | "forOf": true, 23 | // Enable generators 24 | "generators": true, 25 | // Enable modules and global strict mode 26 | "modules": false, 27 | // Enable computed object literal property names 28 | "objectLiteralComputedProperties": true, 29 | // Enable duplicate object literal properties in strict mode 30 | "objectLiteralDuplicateProperties": false, 31 | // Enable object literal shorthand methods 32 | "objectLiteralShorthandMethods": true, 33 | // Enable object literal shorthand properties 34 | "objectLiteralShorthandProperties": true, 35 | // Enable octal literals 36 | "octalLiterals": true, 37 | // Enable the regular expression u flag 38 | "regexUFlag": true, 39 | // Enable the regular expression y flag 40 | "regexYFlag": true, 41 | // Enable the rest parameters 42 | "restParams": true, 43 | // Enable the spread operator for arrays 44 | "spread": true, 45 | // Enable super references inside of functions 46 | "superInFunctions": false, 47 | // Enable template strings 48 | "templateStrings": true, 49 | // Enable code point escapes 50 | "unicodeCodePointEscapes": true, 51 | // Allow return statements in the global scope 52 | "globalReturn": false, 53 | // Enable JSX 54 | "jsx": false, 55 | // Enable support for the experimental object rest/spread properties (IMPORTANT: This is an experimental feature that may change significantly in the future. It's recommended that you do not write rules relying on this functionality unless you are willing to incur maintenance cost when it changes.) 56 | "experimentalObjectRestSpread": false 57 | }, 58 | rules: { 59 | // verify super() callings in constructors 60 | "constructor-super": 0, 61 | // disallow modifying variables of class declarations 62 | "no-class-assign": 0, 63 | // disallow modifying variables that are declared using const 64 | "no-dupe-class-members": 0, 65 | // disallow to use this/super before super() calling in constructors. 66 | "no-this-before-super": 0, 67 | // suggest using Reflect methods where applicable 68 | "prefer-reflect": 0 69 | } 70 | }; 71 | -------------------------------------------------------------------------------- /configurations/walmart/es6-react-test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/configurations/walmart/es6", 6 | "defaults/rules/react/walmart" 7 | ], 8 | "globals": { 9 | "fetch": false 10 | }, 11 | "env": { 12 | "mocha": true 13 | }, 14 | "rules": { 15 | "max-nested-callbacks": 0, 16 | "no-extra-parens": 0, 17 | "no-var": 2 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /configurations/walmart/es6-react.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/configurations/walmart/es6", 6 | "defaults/rules/react/walmart" 7 | ], 8 | "globals": { 9 | "fetch": false 10 | }, 11 | "rules": { 12 | "no-extra-parens": 0, 13 | "no-var": 2 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /configurations/walmart/es6-test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": "defaults/configurations/walmart/es6", 5 | "env": { 6 | "mocha": true 7 | }, 8 | "rules": { 9 | "max-nested-callbacks": 0 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /configurations/walmart/es6.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "extends": [ 5 | "defaults/configurations/walmart/es5", 6 | "defaults/rules/eslint/es6/walmart" 7 | ], 8 | "parser": "babel-eslint", 9 | "rules": { 10 | "strict": [2, "global"] 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "eslint-config-defaults", 3 | "description" : "A set of default eslint configuration", 4 | 5 | "version" : "10.0.0-1", 6 | "author" : "Eric Baer ", 7 | 8 | "homepage" : "https://github.com/walmartlabs/eslint-config-defaults", 9 | "bugs": { 10 | "url": "https://github.com/walmartlabs/eslint-config-defaults/issues" 11 | }, 12 | 13 | "repository" : "git://github.com/walmartlabs/eslint-config-defaults.git", 14 | "private" : false, 15 | 16 | "dependencies": { 17 | }, 18 | 19 | "devDependencies" : { 20 | "babel-eslint": "4.1.8", 21 | "eslint": "^2.0.0", 22 | "eslint-plugin-filenames": "1.0.0", 23 | "eslint-plugin-react": "3.12.0" 24 | }, 25 | 26 | "main": "configurations/eslint.js", 27 | "scripts": { 28 | "test": "eslint configurations rules" 29 | }, 30 | 31 | "engines":{ 32 | "node": ">= 0.10.0" 33 | }, 34 | 35 | "license": "MIT", 36 | 37 | "keywords": [ 38 | "code checker", 39 | "code linter", 40 | "code standards", 41 | "code style", 42 | "eslint-config", 43 | "eslint", 44 | "eslintconfig", 45 | "lint", 46 | "style checker", 47 | "style linter" 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /rules/eslint/best-practices/airbnb.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // Enforces getter/setter pairs in objects 6 | "accessor-pairs": 0, 7 | // treat var statements as if they were block scoped 8 | "block-scoped-var": 2, 9 | // specify the maximum cyclomatic complexity allowed in a program 10 | "complexity": [0, 11], 11 | // require return statements to either always or never specify values 12 | "consistent-return": 2, 13 | // specify curly brace conventions for all control statements 14 | "curly": [2, "multi-line"], 15 | // require default case in switch statements 16 | "default-case": 2, 17 | // enforces consistent newlines before or after dots 18 | "dot-location": 0, 19 | // encourages use of dot notation whenever possible 20 | "dot-notation": [2, { "allowKeywords": true}], 21 | // require the use of === and !== 22 | "eqeqeq": 2, 23 | // make sure for-in loops have an if statement 24 | "guard-for-in": 2, 25 | // disallow the use of alert, confirm, and prompt 26 | "no-alert": 1, 27 | // disallow use of arguments.caller or arguments.callee 28 | "no-caller": 2, 29 | // disallow lexical declarations in case clauses 30 | "no-case-declarations": 2, 31 | // disallow division operators explicitly at beginning of regular expression 32 | "no-div-regex": 0, 33 | // disallow else after a return in an if 34 | "no-else-return": 2, 35 | // disallow use of empty destructuring patterns 36 | "no-empty-pattern": 0, 37 | // disallow comparisons to null without a type-checking operator 38 | "no-eq-null": 0, 39 | // disallow use of eval() 40 | "no-eval": 2, 41 | // disallow adding to native types 42 | "no-extend-native": 2, 43 | // disallow unnecessary function binding 44 | "no-extra-bind": 2, 45 | // disallow fallthrough of case statements 46 | "no-fallthrough": 2, 47 | // disallow the use of leading or trailing decimal points in numeric literals 48 | "no-floating-decimal": 2, 49 | // disallow the type conversions with shorter notations 50 | "no-implicit-coercion": 0, 51 | // disallow use of eval()-like methods 52 | "no-implied-eval": 2, 53 | // disallow this keywords outside of classes or class-like objects 54 | "no-invalid-this": 0, 55 | // disallow usage of __iterator__ property 56 | "no-iterator": 2, 57 | // disallow use of labeled statements 58 | "no-labels": [2, {"allowLoop": true, "allowSwitch": true}], 59 | // disallow unnecessary nested blocks 60 | "no-lone-blocks": 2, 61 | // disallow creation of functions within loops 62 | "no-loop-func": 2, 63 | // disallow the use of magic numbers 64 | "no-magic-numbers": 0, 65 | // disallow use of multiple spaces 66 | "no-multi-spaces": 2, 67 | // disallow use of multiline strings 68 | "no-multi-str": 2, 69 | // disallow reassignments of native objects 70 | "no-native-reassign": 2, 71 | // disallow use of new operator for Function object 72 | "no-new-func": 2, 73 | // disallows creating new instances of String,Number, and Boolean 74 | "no-new-wrappers": 2, 75 | // disallow use of new operator when not part of the assignment or comparison 76 | "no-new": 2, 77 | // disallow use of octal escape sequences in string literals, such as 78 | // var foo = "Copyright \251"; 79 | "no-octal-escape": 2, 80 | // disallow use of (old style) octal literals 81 | "no-octal": 2, 82 | // disallow reassignment of function parameters 83 | "no-param-reassign": [2, { "props": true }], 84 | // disallow use of process.env 85 | "no-process-env": 0, 86 | // disallow usage of __proto__ property 87 | "no-proto": 2, 88 | // disallow declaring the same variable more then once 89 | "no-redeclare": 2, 90 | // disallow use of assignment in return statement 91 | "no-return-assign": 2, 92 | // disallow use of `javascript:` urls. 93 | "no-script-url": 2, 94 | // disallow comparisons where both sides are exactly the same 95 | "no-self-compare": 2, 96 | // disallow use of comma operator 97 | "no-sequences": 2, 98 | // restrict what can be thrown as an exception 99 | "no-throw-literal": 2, 100 | // disallow usage of expressions in statement position 101 | "no-unused-expressions": 2, 102 | // disallow unnecessary .call() and .apply() 103 | "no-useless-call": 0, 104 | // disallow unnecessary concatenation of literals or template literals 105 | "no-useless-concat": 0, 106 | // disallow use of void operator 107 | "no-void": 0, 108 | // disallow usage of configurable warning terms in comments: e.g. todo 109 | "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }], 110 | // disallow use of the with statement 111 | "no-with": 2, 112 | // require use of the second argument for parseInt() 113 | "radix": 2, 114 | // requires to declare all vars on top of their containing scope 115 | "vars-on-top": 2, 116 | // require immediate function invocation to be wrapped in parentheses 117 | "wrap-iife": [2, "outside"], 118 | // require or disallow Yoda conditions 119 | "yoda": 2 120 | } 121 | }; 122 | -------------------------------------------------------------------------------- /rules/eslint/best-practices/eslint.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // Enforces getter/setter pairs in objects 6 | "accessor-pairs": 0, 7 | // treat var statements as if they were block scoped 8 | "block-scoped-var": 0, 9 | // specify the maximum cyclomatic complexity allowed in a program 10 | "complexity": [0, 11], 11 | // require return statements to either always or never specify values 12 | "consistent-return": 0, 13 | // specify curly brace conventions for all control statements 14 | "curly": [0, "all"], 15 | // require default case in switch statements 16 | "default-case": 0, 17 | // enforces consistent newlines before or after dots 18 | "dot-location": 0, 19 | // encourages use of dot notation whenever possible 20 | "dot-notation": [0, { "allowKeywords": true }], 21 | // require the use of === and !== 22 | "eqeqeq": 0, 23 | // make sure for-in loops have an if statement 24 | "guard-for-in": 0, 25 | // disallow the use of alert, confirm, and prompt 26 | "no-alert": 0, 27 | // disallow use of arguments.caller or arguments.callee 28 | "no-caller": 0, 29 | // disallow lexical declarations in case clauses 30 | "no-case-declarations": 0, 31 | // disallow division operators explicitly at beginning of regular expression 32 | "no-div-regex": 0, 33 | // disallow else after a return in an if 34 | "no-else-return": 0, 35 | // disallow use of empty destructuring patterns 36 | "no-empty-pattern": 0, 37 | // disallow comparisons to null without a type-checking operator 38 | "no-eq-null": 0, 39 | // disallow use of eval() 40 | "no-eval": 0, 41 | // disallow adding to native types 42 | "no-extend-native": 0, 43 | // disallow unnecessary function binding 44 | "no-extra-bind": 0, 45 | // disallow fallthrough of case statements 46 | "no-fallthrough": 2, 47 | // disallow the use of leading or trailing decimal points in numeric literals 48 | "no-floating-decimal": 0, 49 | // disallow the type conversions with shorter notations 50 | "no-implicit-coercion": 0, 51 | // disallow use of eval()-like methods 52 | "no-implied-eval": 0, 53 | // disallow this keywords outside of classes or class-like objects 54 | "no-invalid-this": 0, 55 | // disallow usage of __iterator__ property 56 | "no-iterator": 0, 57 | // disallow use of labeled statements 58 | "no-labels": 0, 59 | // disallow unnecessary nested blocks 60 | "no-lone-blocks": 0, 61 | // disallow creation of functions within loops 62 | "no-loop-func": 0, 63 | // disallow the use of magic numbers 64 | "no-magic-numbers": 0, 65 | // disallow use of multiple spaces 66 | "no-multi-spaces": 0, 67 | // disallow use of multiline strings 68 | "no-multi-str": 0, 69 | // disallow reassignments of native objects 70 | "no-native-reassign": 0, 71 | // disallow use of new operator for Function object 72 | "no-new-func": 0, 73 | // disallows creating new instances of String,Number, and Boolean 74 | "no-new-wrappers": 0, 75 | // disallow use of new operator when not part of the assignment or comparison 76 | "no-new": 0, 77 | // disallow use of octal escape sequences in string literals, such as 78 | // var foo = "Copyright \251"; 79 | "no-octal-escape": 0, 80 | // disallow use of (old style) octal literals 81 | "no-octal": 2, 82 | // disallow reassignment of function parameters 83 | "no-param-reassign": 0, 84 | // disallow use of process.env 85 | "no-process-env": 0, 86 | // disallow usage of __proto__ property 87 | "no-proto": 0, 88 | // disallow declaring the same variable more then once 89 | "no-redeclare": 2, 90 | // disallow use of assignment in return statement 91 | "no-return-assign": 0, 92 | // disallow use of `javascript:` urls. 93 | "no-script-url": 0, 94 | // disallow comparisons where both sides are exactly the same 95 | "no-self-compare": 0, 96 | // disallow use of comma operator 97 | "no-sequences": 0, 98 | // restrict what can be thrown as an exception 99 | "no-throw-literal": 0, 100 | // disallow usage of expressions in statement position 101 | "no-unused-expressions": 0, 102 | // disallow unnecessary .call() and .apply() 103 | "no-useless-call": 0, 104 | // disallow unnecessary concatenation of literals or template literals 105 | "no-useless-concat": 0, 106 | // disallow use of void operator 107 | "no-void": 0, 108 | // disallow usage of configurable warning terms in comments: e.g. todo 109 | "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }], 110 | // disallow use of the with statement 111 | "no-with": 0, 112 | // require use of the second argument for parseInt() 113 | "radix": 0, 114 | // requires to declare all vars on top of their containing scope 115 | "vars-on-top": 0, 116 | // require immediate function invocation to be wrapped in parentheses 117 | "wrap-iife": 0, 118 | // require or disallow Yoda conditions 119 | "yoda": [0, "never"] 120 | } 121 | }; 122 | -------------------------------------------------------------------------------- /rules/eslint/best-practices/google.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // Enforces getter/setter pairs in objects 6 | "accessor-pairs": 0, 7 | // treat var statements as if they were block scoped 8 | "block-scoped-var": 0, 9 | // specify the maximum cyclomatic complexity allowed in a program 10 | "complexity": 0, 11 | // require return statements to either always or never specify values 12 | "consistent-return": 0, 13 | // specify curly brace conventions for all control statements 14 | "curly": [2, "all"], 15 | // require default case in switch statements 16 | "default-case": 2, 17 | // enforces consistent newlines before or after dots 18 | "dot-location": [2, "object"], 19 | // encourages use of dot notation whenever possible 20 | "dot-notation": 0, 21 | // require the use of === and !== 22 | "eqeqeq": 0, 23 | // make sure for-in loops have an if statement 24 | "guard-for-in": 2, 25 | // disallow the use of alert, confirm, and prompt 26 | "no-alert": 0, 27 | // disallow use of arguments.caller or arguments.callee 28 | "no-caller": 0, 29 | // disallow lexical declarations in case clauses 30 | "no-case-declarations": 0, 31 | // disallow division operators explicitly at beginning of regular expression 32 | "no-div-regex": 0, 33 | // disallow else after a return in an if 34 | "no-else-return": 0, 35 | // disallow use of empty destructuring patterns 36 | "no-empty-pattern": 0, 37 | // disallow comparisons to null without a type-checking operator 38 | "no-eq-null": 0, 39 | // disallow use of eval() 40 | "no-eval": 2, 41 | // disallow adding to native types 42 | "no-extend-native": 2, 43 | // disallow unnecessary function binding 44 | "no-extra-bind": 0, 45 | // disallow fallthrough of case statements 46 | "no-fallthrough": 0, 47 | // disallow the use of leading or trailing decimal points in numeric literals 48 | "no-floating-decimal": 0, 49 | // disallow the type conversions with shorter notations 50 | "no-implicit-coercion": 0, 51 | // disallow use of eval()-like methods 52 | "no-implied-eval": 0, 53 | // disallow this keywords outside of classes or class-like objects 54 | "no-invalid-this": 2, 55 | // disallow usage of __iterator__ property 56 | "no-iterator": 0, 57 | // disallow use of labeled statements 58 | "no-labels": 0, 59 | // disallow unnecessary nested blocks 60 | "no-lone-blocks": 0, 61 | // disallow creation of functions within loops 62 | "no-loop-func": 2, 63 | // disallow the use of magic numbers 64 | "no-magic-numbers": 0, 65 | // disallow use of multiple spaces 66 | "no-multi-spaces": 0, 67 | // disallow use of multiline strings 68 | "no-multi-str": 2, 69 | // disallow reassignments of native objects 70 | "no-native-reassign": 0, 71 | // disallow use of new operator for Function object 72 | "no-new-func": 0, 73 | // disallows creating new instances of String,Number, and Boolean 74 | "no-new-wrappers": 0, 75 | // disallow use of new operator when not part of the assignment or comparison 76 | "no-new": 0, 77 | // disallow use of octal escape sequences in string literals, such as 78 | // var foo = "Copyright \251"; 79 | "no-octal-escape": 0, 80 | // disallow use of (old style) octal literals 81 | "no-octal": 0, 82 | // disallow reassignment of function parameters 83 | "no-param-reassign": 0, 84 | // disallow use of process.env 85 | "no-process-env": 0, 86 | // disallow usage of __proto__ property 87 | "no-proto": 0, 88 | // disallow declaring the same variable more then once 89 | "no-redeclare": 0, 90 | // disallow use of assignment in return statement 91 | "no-return-assign": 0, 92 | // disallow use of `javascript:` urls. 93 | "no-script-url": 0, 94 | // disallow comparisons where both sides are exactly the same 95 | "no-self-compare": 0, 96 | // disallow use of comma operator 97 | "no-sequences": 0, 98 | // restrict what can be thrown as an exception 99 | "no-throw-literal": 0, 100 | // disallow usage of expressions in statement position 101 | "no-unused-expressions": 0, 102 | // disallow unnecessary .call() and .apply() 103 | "no-useless-call": 0, 104 | // disallow unnecessary concatenation of literals or template literals 105 | "no-useless-concat": 0, 106 | // disallow use of void operator 107 | "no-void": 0, 108 | // disallow usage of configurable warning terms in comments: e.g. todo 109 | "no-warning-comments": 0, 110 | // disallow use of the with statement 111 | "no-with": 2, 112 | // require use of the second argument for parseInt() 113 | "radix": 0, 114 | // requires to declare all vars on top of their containing scope 115 | "vars-on-top": 0, 116 | // require immediate function invocation to be wrapped in parentheses 117 | "wrap-iife": 0, 118 | // require or disallow Yoda conditions 119 | "yoda": 0 120 | } 121 | }; 122 | -------------------------------------------------------------------------------- /rules/eslint/best-practices/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // Enforces getter/setter pairs in objects 6 | "accessor-pairs": 0, 7 | // treat var statements as if they were block scoped 8 | "block-scoped-var": 2, 9 | // specify the maximum cyclomatic complexity allowed in a program 10 | "complexity": 0, 11 | // require return statements to either always or never specify values 12 | "consistent-return": 0, 13 | // specify curly brace conventions for all control statements 14 | "curly": 2, 15 | // require default case in switch statements 16 | "default-case": 0, 17 | // enforces consistent newlines before or after dots 18 | "dot-location": 0, 19 | // encourages use of dot notation whenever possible 20 | "dot-notation": 0, 21 | // require the use of === and !== 22 | "eqeqeq": [2, "smart"], 23 | // make sure for-in loops have an if statement 24 | "guard-for-in": 0, 25 | // disallow the use of alert, confirm, and prompt 26 | "no-alert": 0, 27 | // disallow use of arguments.caller or arguments.callee 28 | "no-caller": 0, 29 | // disallow lexical declarations in case clauses 30 | "no-case-declarations": 0, 31 | // disallow division operators explicitly at beginning of regular expression 32 | "no-div-regex": 0, 33 | // disallow else after a return in an if 34 | "no-else-return": 0, 35 | // disallow use of empty destructuring patterns 36 | "no-empty-pattern": 0, 37 | // disallow comparisons to null without a type-checking operator 38 | "no-eq-null": 0, 39 | // disallow use of eval() 40 | "no-eval": 0, 41 | // disallow adding to native types 42 | "no-extend-native": 2, 43 | // disallow unnecessary function binding 44 | "no-extra-bind": 0, 45 | // disallow fallthrough of case statements 46 | "no-fallthrough": 0, 47 | // disallow the use of leading or trailing decimal points in numeric literals 48 | "no-floating-decimal": 0, 49 | // disallow the type conversions with shorter notations 50 | "no-implicit-coercion": 0, 51 | // disallow use of eval()-like methods 52 | "no-implied-eval": 0, 53 | // disallow this keywords outside of classes or class-like objects 54 | "no-invalid-this": 0, 55 | // disallow usage of __iterator__ property 56 | "no-iterator": 0, 57 | // disallow use of labeled statements 58 | "no-labels": 0, 59 | // disallow unnecessary nested blocks 60 | "no-lone-blocks": 0, 61 | // disallow creation of functions within loops 62 | "no-loop-func": 0, 63 | // disallow the use of magic numbers 64 | "no-magic-numbers": 0, 65 | // disallow use of multiple spaces 66 | "no-multi-spaces": 0, 67 | // disallow use of multiline strings 68 | "no-multi-str": 0, 69 | // disallow reassignments of native objects 70 | "no-native-reassign": 0, 71 | // disallow use of new operator for Function object 72 | "no-new-func": 0, 73 | // disallows creating new instances of String,Number, and Boolean 74 | "no-new-wrappers": 0, 75 | // disallow use of new operator when not part of the assignment or comparison 76 | "no-new": 0, 77 | // disallow use of octal escape sequences in string literals, such as 78 | // var foo = "Copyright \251"; 79 | "no-octal-escape": 0, 80 | // disallow use of (old style) octal literals 81 | "no-octal": 0, 82 | // disallow reassignment of function parameters 83 | "no-param-reassign": 0, 84 | // disallow use of process.env 85 | "no-process-env": 0, 86 | // disallow usage of __proto__ property 87 | "no-proto": 0, 88 | // disallow declaring the same variable more then once 89 | "no-redeclare": 0, 90 | // disallow use of assignment in return statement 91 | "no-return-assign": 0, 92 | // disallow use of `javascript:` urls. 93 | "no-script-url": 0, 94 | // disallow comparisons where both sides are exactly the same 95 | "no-self-compare": 0, 96 | // disallow use of comma operator 97 | "no-sequences": 0, 98 | // restrict what can be thrown as an exception 99 | "no-throw-literal": 0, 100 | // disallow usage of expressions in statement position 101 | "no-unused-expressions": 0, 102 | // disallow unnecessary .call() and .apply() 103 | "no-useless-call": 0, 104 | // disallow unnecessary concatenation of literals or template literals 105 | "no-useless-concat": 0, 106 | // disallow use of void operator 107 | "no-void": 0, 108 | // disallow usage of configurable warning terms in comments: e.g. todo 109 | "no-warning-comments": 0, 110 | // disallow use of the with statement 111 | "no-with": 0, 112 | // require use of the second argument for parseInt() 113 | "radix": 0, 114 | // requires to declare all vars on top of their containing scope 115 | "vars-on-top": 0, 116 | // require immediate function invocation to be wrapped in parentheses 117 | "wrap-iife": 0, 118 | // require or disallow Yoda conditions 119 | "yoda": 0 120 | } 121 | }; 122 | -------------------------------------------------------------------------------- /rules/eslint/best-practices/node-runtime.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // Enforces getter/setter pairs in objects 6 | "accessor-pairs": 0, 7 | // treat var statements as if they were block scoped 8 | "block-scoped-var": 0, 9 | // specify the maximum cyclomatic complexity allowed in a program 10 | "complexity": 0, 11 | // require return statements to either always or never specify values 12 | "consistent-return": 0, 13 | // specify curly brace conventions for all control statements 14 | "curly": 0, 15 | // require default case in switch statements 16 | "default-case": 0, 17 | // enforces consistent newlines before or after dots 18 | "dot-location": 0, 19 | // encourages use of dot notation whenever possible 20 | "dot-notation": 0, 21 | // require the use of === and !== 22 | "eqeqeq": 0, 23 | // make sure for-in loops have an if statement 24 | "guard-for-in": 0, 25 | // disallow the use of alert, confirm, and prompt 26 | "no-alert": 0, 27 | // disallow use of arguments.caller or arguments.callee 28 | "no-caller": 0, 29 | // disallow lexical declarations in case clauses 30 | "no-case-declarations": 0, 31 | // disallow division operators explicitly at beginning of regular expression 32 | "no-div-regex": 0, 33 | // disallow else after a return in an if 34 | "no-else-return": 0, 35 | // disallow use of empty destructuring patterns 36 | "no-empty-pattern": 0, 37 | // disallow comparisons to null without a type-checking operator 38 | "no-eq-null": 0, 39 | // disallow use of eval() 40 | "no-eval": 0, 41 | // disallow adding to native types 42 | "no-extend-native": 0, 43 | // disallow unnecessary function binding 44 | "no-extra-bind": 0, 45 | // disallow fallthrough of case statements 46 | "no-fallthrough": 2, 47 | // disallow the use of leading or trailing decimal points in numeric literals 48 | "no-floating-decimal": 0, 49 | // disallow the type conversions with shorter notations 50 | "no-implicit-coercion": 0, 51 | // disallow use of eval()-like methods 52 | "no-implied-eval": 0, 53 | // disallow this keywords outside of classes or class-like objects 54 | "no-invalid-this": 0, 55 | // disallow usage of __iterator__ property 56 | "no-iterator": 0, 57 | // disallow use of labeled statements 58 | "no-labels": 0, 59 | // disallow unnecessary nested blocks 60 | "no-lone-blocks": 0, 61 | // disallow creation of functions within loops 62 | "no-loop-func": 0, 63 | // disallow the use of magic numbers 64 | "no-magic-numbers": 0, 65 | // disallow use of multiple spaces 66 | "no-multi-spaces": 0, 67 | // disallow use of multiline strings 68 | "no-multi-str": 0, 69 | // disallow reassignments of native objects 70 | "no-native-reassign": 0, 71 | // disallow use of new operator for Function object 72 | "no-new-func": 0, 73 | // disallows creating new instances of String,Number, and Boolean 74 | "no-new-wrappers": 0, 75 | // disallow use of new operator when not part of the assignment or comparison 76 | "no-new": 0, 77 | // disallow use of octal escape sequences in string literals, such as 78 | // var foo = "Copyright \251"; 79 | "no-octal-escape": 0, 80 | // disallow use of (old style) octal literals 81 | "no-octal": 0, 82 | // disallow reassignment of function parameters 83 | "no-param-reassign": 0, 84 | // disallow use of process.env 85 | "no-process-env": 0, 86 | // disallow usage of __proto__ property 87 | "no-proto": 0, 88 | // disallow declaring the same variable more then once 89 | "no-redeclare": 2, 90 | // disallow use of assignment in return statement 91 | "no-return-assign": 0, 92 | // disallow use of `javascript:` urls. 93 | "no-script-url": 0, 94 | // disallow comparisons where both sides are exactly the same 95 | "no-self-compare": 0, 96 | // disallow use of comma operator 97 | "no-sequences": 0, 98 | // restrict what can be thrown as an exception 99 | "no-throw-literal": 0, 100 | // disallow usage of expressions in statement position 101 | "no-unused-expressions": 0, 102 | // disallow unnecessary .call() and .apply() 103 | "no-useless-call": 0, 104 | // disallow unnecessary concatenation of literals or template literals 105 | "no-useless-concat": 0, 106 | // disallow use of void operator 107 | "no-void": 0, 108 | // disallow usage of configurable warning terms in comments: e.g. todo 109 | "no-warning-comments": 0, 110 | // disallow use of the with statement 111 | "no-with": 0, 112 | // require use of the second argument for parseInt() 113 | "radix": 0, 114 | // requires to declare all vars on top of their containing scope 115 | "vars-on-top": 0, 116 | // require immediate function invocation to be wrapped in parentheses 117 | "wrap-iife": 0, 118 | // require or disallow Yoda conditions 119 | "yoda": 0 120 | } 121 | }; 122 | -------------------------------------------------------------------------------- /rules/eslint/best-practices/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // Enforces getter/setter pairs in objects 6 | "accessor-pairs": 0, 7 | // treat var statements as if they were block scoped 8 | "block-scoped-var": 0, 9 | // specify the maximum cyclomatic complexity allowed in a program 10 | "complexity": 0, 11 | // require return statements to either always or never specify values 12 | "consistent-return": 0, 13 | // specify curly brace conventions for all control statements 14 | "curly": 0, 15 | // require default case in switch statements 16 | "default-case": 0, 17 | // enforces consistent newlines before or after dots 18 | "dot-location": 0, 19 | // encourages use of dot notation whenever possible 20 | "dot-notation": 0, 21 | // require the use of === and !== 22 | "eqeqeq": 0, 23 | // make sure for-in loops have an if statement 24 | "guard-for-in": 0, 25 | // disallow the use of alert, confirm, and prompt 26 | "no-alert": 0, 27 | // disallow use of arguments.caller or arguments.callee 28 | "no-caller": 0, 29 | // disallow lexical declarations in case clauses 30 | "no-case-declarations": 0, 31 | // disallow division operators explicitly at beginning of regular expression 32 | "no-div-regex": 0, 33 | // disallow else after a return in an if 34 | "no-else-return": 0, 35 | // disallow use of empty destructuring patterns 36 | "no-empty-pattern": 0, 37 | // disallow comparisons to null without a type-checking operator 38 | "no-eq-null": 0, 39 | // disallow use of eval() 40 | "no-eval": 0, 41 | // disallow adding to native types 42 | "no-extend-native": 0, 43 | // disallow unnecessary function binding 44 | "no-extra-bind": 0, 45 | // disallow fallthrough of case statements 46 | "no-fallthrough": 0, 47 | // disallow the use of leading or trailing decimal points in numeric literals 48 | "no-floating-decimal": 0, 49 | // disallow the type conversions with shorter notations 50 | "no-implicit-coercion": 0, 51 | // disallow use of eval()-like methods 52 | "no-implied-eval": 0, 53 | // disallow this keywords outside of classes or class-like objects 54 | "no-invalid-this": 0, 55 | // disallow usage of __iterator__ property 56 | "no-iterator": 0, 57 | // disallow use of labeled statements 58 | "no-labels": 0, 59 | // disallow unnecessary nested blocks 60 | "no-lone-blocks": 0, 61 | // disallow creation of functions within loops 62 | "no-loop-func": 0, 63 | // disallow the use of magic numbers 64 | "no-magic-numbers": 0, 65 | // disallow use of multiple spaces 66 | "no-multi-spaces": 0, 67 | // disallow use of multiline strings 68 | "no-multi-str": 0, 69 | // disallow reassignments of native objects 70 | "no-native-reassign": 0, 71 | // disallow use of new operator for Function object 72 | "no-new-func": 0, 73 | // disallows creating new instances of String,Number, and Boolean 74 | "no-new-wrappers": 0, 75 | // disallow use of new operator when not part of the assignment or comparison 76 | "no-new": 0, 77 | // disallow use of octal escape sequences in string literals, such as 78 | // var foo = "Copyright \251"; 79 | "no-octal-escape": 0, 80 | // disallow use of (old style) octal literals 81 | "no-octal": 0, 82 | // disallow reassignment of function parameters 83 | "no-param-reassign": 0, 84 | // disallow use of process.env 85 | "no-process-env": 0, 86 | // disallow usage of __proto__ property 87 | "no-proto": 0, 88 | // disallow declaring the same variable more then once 89 | "no-redeclare": 0, 90 | // disallow use of assignment in return statement 91 | "no-return-assign": 0, 92 | // disallow use of `javascript:` urls. 93 | "no-script-url": 0, 94 | // disallow comparisons where both sides are exactly the same 95 | "no-self-compare": 0, 96 | // disallow use of comma operator 97 | "no-sequences": 0, 98 | // restrict what can be thrown as an exception 99 | "no-throw-literal": 0, 100 | // disallow usage of expressions in statement position 101 | "no-unused-expressions": 0, 102 | // disallow unnecessary .call() and .apply() 103 | "no-useless-call": 0, 104 | // disallow unnecessary concatenation of literals or template literals 105 | "no-useless-concat": 0, 106 | // disallow use of void operator 107 | "no-void": 0, 108 | // disallow usage of configurable warning terms in comments: e.g. todo 109 | "no-warning-comments": 0, 110 | // disallow use of the with statement 111 | "no-with": 0, 112 | // require use of the second argument for parseInt() 113 | "radix": 0, 114 | // requires to declare all vars on top of their containing scope 115 | "vars-on-top": 0, 116 | // require immediate function invocation to be wrapped in parentheses 117 | "wrap-iife": 0, 118 | // require or disallow Yoda conditions 119 | "yoda": 0 120 | } 121 | }; 122 | -------------------------------------------------------------------------------- /rules/eslint/best-practices/walmart.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // Enforces getter/setter pairs in objects 6 | "accessor-pairs": 0, 7 | // treat var statements as if they were block scoped 8 | "block-scoped-var": 0, 9 | // specify the maximum cyclomatic complexity allowed in a program 10 | "complexity": [2, 11], 11 | // require return statements to either always or never specify values 12 | "consistent-return": 2, 13 | // specify curly brace conventions for all control statements 14 | "curly": [2, "all"], 15 | // require default case in switch statements 16 | "default-case": 0, 17 | // enforces consistent newlines before or after dots 18 | "dot-location": 0, 19 | // encourages use of dot notation whenever possible 20 | "dot-notation": [2, { "allowKeywords": true }], 21 | // require the use of === and !== 22 | "eqeqeq": 2, 23 | // make sure for-in loops have an if statement 24 | "guard-for-in": 0, 25 | // disallow the use of alert, confirm, and prompt 26 | "no-alert": 2, 27 | // disallow use of arguments.caller or arguments.callee 28 | "no-caller": 2, 29 | // disallow lexical declarations in case clauses 30 | "no-case-declarations": 2, 31 | // disallow division operators explicitly at beginning of regular expression 32 | "no-div-regex": 0, 33 | // disallow else after a return in an if 34 | "no-else-return": 0, 35 | // disallow use of empty destructuring patterns 36 | "no-empty-pattern": 2, 37 | // disallow comparisons to null without a type-checking operator 38 | "no-eq-null": 0, 39 | // disallow use of eval() 40 | "no-eval": 2, 41 | // disallow adding to native types 42 | "no-extend-native": 2, 43 | // disallow unnecessary function binding 44 | "no-extra-bind": 2, 45 | // disallow fallthrough of case statements 46 | "no-fallthrough": 2, 47 | // disallow the use of leading or trailing decimal points in numeric literals 48 | "no-floating-decimal": 0, 49 | // disallow the type conversions with shorter notations 50 | "no-implicit-coercion": 0, 51 | // disallow use of eval()-like methods 52 | "no-implied-eval": 2, 53 | // disallow this keywords outside of classes or class-like objects 54 | "no-invalid-this": 2, 55 | // disallow usage of __iterator__ property 56 | "no-iterator": 2, 57 | // disallow use of labeled statements 58 | "no-labels": [2, {"allowLoop": true, "allowSwitch": true}], 59 | // disallow unnecessary nested blocks 60 | "no-lone-blocks": 2, 61 | // disallow creation of functions within loops 62 | "no-loop-func": 2, 63 | // disallow the use of magic numbers 64 | "no-magic-numbers": 2, 65 | // disallow use of multiple spaces 66 | "no-multi-spaces": 2, 67 | // disallow use of multiline strings 68 | "no-multi-str": 2, 69 | // disallow reassignments of native objects 70 | "no-native-reassign": 2, 71 | // disallow use of new operator for Function object 72 | "no-new-func": 2, 73 | // disallows creating new instances of String,Number, and Boolean 74 | "no-new-wrappers": 2, 75 | // disallow use of new operator when not part of the assignment or comparison 76 | "no-new": 2, 77 | // disallow use of octal escape sequences in string literals, such as 78 | // var foo = "Copyright \251"; 79 | "no-octal-escape": 2, 80 | // disallow use of (old style) octal literals 81 | "no-octal": 2, 82 | // disallow reassignment of function parameters 83 | "no-param-reassign": 0, 84 | // disallow use of process.env 85 | "no-process-env": 0, 86 | // disallow usage of __proto__ property 87 | "no-proto": 2, 88 | // disallow declaring the same variable more then once 89 | "no-redeclare": 2, 90 | // disallow use of assignment in return statement 91 | "no-return-assign": 2, 92 | // disallow use of `javascript:` urls. 93 | "no-script-url": 2, 94 | // disallow comparisons where both sides are exactly the same 95 | "no-self-compare": 2, 96 | // disallow use of comma operator 97 | "no-sequences": 2, 98 | // restrict what can be thrown as an exception 99 | "no-throw-literal": 2, 100 | // disallow usage of expressions in statement position 101 | "no-unused-expressions": 2, 102 | // disallow unnecessary .call() and .apply() 103 | "no-useless-call": 2, 104 | // disallow unnecessary concatenation of literals or template literals 105 | "no-useless-concat": 2, 106 | // disallow use of void operator 107 | "no-void": 0, 108 | // disallow usage of configurable warning terms in comments: e.g. todo 109 | "no-warning-comments": 0, 110 | // disallow use of the with statement 111 | "no-with": 2, 112 | // require use of the second argument for parseInt() 113 | "radix": 0, 114 | // requires to declare all vars on top of their containing scope 115 | "vars-on-top": 0, 116 | // require immediate function invocation to be wrapped in parentheses 117 | "wrap-iife": 0, 118 | // require or disallow Yoda conditions 119 | "yoda": [2, "never"] 120 | } 121 | }; 122 | -------------------------------------------------------------------------------- /rules/eslint/errors/airbnb.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // disallow trailing commas in object literals 6 | "comma-dangle": [2, "always-multiline"], 7 | // disallow assignment in conditional expressions 8 | "no-cond-assign": [2, "always"], 9 | // disallow use of console 10 | "no-console": 1, 11 | // disallow use of constant expressions in conditions 12 | "no-constant-condition": 1, 13 | // disallow control characters in regular expressions 14 | "no-control-regex": 2, 15 | // disallow use of debugger 16 | "no-debugger": 1, 17 | // disallow duplicate arguments in functions 18 | "no-dupe-args": 2, 19 | // disallow duplicate keys when creating object literals 20 | "no-dupe-keys": 2, 21 | // disallow a duplicate case label. 22 | "no-duplicate-case": 2, 23 | // disallow the use of empty character classes in regular expressions 24 | "no-empty-character-class": 2, 25 | // disallow empty statements 26 | "no-empty": 2, 27 | // disallow assigning to the exception in a catch block 28 | "no-ex-assign": 2, 29 | // disallow double-negation boolean casts in a boolean context 30 | "no-extra-boolean-cast": 0, 31 | // disallow unnecessary parentheses 32 | "no-extra-parens": [2, "functions"], 33 | // disallow unnecessary semicolons 34 | "no-extra-semi": 2, 35 | // disallow overwriting functions written as function declarations 36 | "no-func-assign": 2, 37 | // disallow function or variable declarations in nested blocks 38 | "no-inner-declarations": 2, 39 | // disallow invalid regular expression strings in the RegExp constructor 40 | "no-invalid-regexp": 2, 41 | // disallow irregular whitespace outside of strings and comments 42 | "no-irregular-whitespace": 2, 43 | // disallow negation of the left operand of an in expression 44 | "no-negated-in-lhs": 2, 45 | // disallow the use of object properties of the global object (Math and JSON) as functions 46 | "no-obj-calls": 2, 47 | // disallow multiple spaces in a regular expression literal 48 | "no-regex-spaces": 2, 49 | // disallow sparse arrays 50 | "no-sparse-arrays": 2, 51 | // Avoid code that looks like two expressions but is actually one 52 | "no-unexpected-multiline": 0, 53 | // disallow unreachable statements after a return, throw, continue, or break statement 54 | "no-unreachable": 2, 55 | // disallow comparisons with the value NaN 56 | "use-isnan": 2, 57 | // ensure JSDoc comments are valid 58 | "valid-jsdoc": 0, 59 | // ensure that the results of typeof are compared against a valid string 60 | "valid-typeof": 2 61 | } 62 | }; 63 | -------------------------------------------------------------------------------- /rules/eslint/errors/eslint.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // disallow trailing commas in object literals 6 | "comma-dangle": [2, "never"], 7 | // disallow assignment in conditional expressions 8 | "no-cond-assign": 2, 9 | // disallow use of console 10 | "no-console": 2, 11 | // disallow use of constant expressions in conditions 12 | "no-constant-condition": 2, 13 | // disallow control characters in regular expressions 14 | "no-control-regex": 2, 15 | // disallow use of debugger 16 | "no-debugger": 2, 17 | // disallow duplicate arguments in functions 18 | "no-dupe-args": 2, 19 | // disallow duplicate keys when creating object literals 20 | "no-dupe-keys": 2, 21 | // disallow a duplicate case label. 22 | "no-duplicate-case": 2, 23 | // disallow the use of empty character classes in regular expressions 24 | "no-empty-character-class": 2, 25 | // disallow empty statements 26 | "no-empty": 2, 27 | // disallow assigning to the exception in a catch block 28 | "no-ex-assign": 2, 29 | // disallow double-negation boolean casts in a boolean context 30 | "no-extra-boolean-cast": 2, 31 | // disallow unnecessary parentheses 32 | "no-extra-parens": 0, 33 | // disallow unnecessary semicolons 34 | "no-extra-semi": 2, 35 | // disallow overwriting functions written as function declarations 36 | "no-func-assign": 2, 37 | // disallow function or variable declarations in nested blocks 38 | "no-inner-declarations": [2, "functions"], 39 | // disallow invalid regular expression strings in the RegExp constructor 40 | "no-invalid-regexp": 2, 41 | // disallow irregular whitespace outside of strings and comments 42 | "no-irregular-whitespace": 2, 43 | // disallow negation of the left operand of an in expression 44 | "no-negated-in-lhs": 2, 45 | // disallow the use of object properties of the global object (Math and JSON) as functions 46 | "no-obj-calls": 2, 47 | // disallow multiple spaces in a regular expression literal 48 | "no-regex-spaces": 2, 49 | // disallow sparse arrays 50 | "no-sparse-arrays": 2, 51 | // Avoid code that looks like two expressions but is actually one 52 | "no-unexpected-multiline": 0, 53 | // disallow unreachable statements after a return, throw, continue, or break statement 54 | "no-unreachable": 2, 55 | // disallow comparisons with the value NaN 56 | "use-isnan": 2, 57 | // ensure JSDoc comments are valid 58 | "valid-jsdoc": 0, 59 | // ensure that the results of typeof are compared against a valid string 60 | "valid-typeof": 2 61 | } 62 | }; 63 | -------------------------------------------------------------------------------- /rules/eslint/errors/google.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // disallow trailing commas in object literals 6 | "comma-dangle": 0, 7 | // disallow assignment in conditional expressions 8 | "no-cond-assign": 0, 9 | // disallow use of console 10 | "no-console": 0, 11 | // disallow use of constant expressions in conditions 12 | "no-constant-condition": 0, 13 | // disallow control characters in regular expressions 14 | "no-control-regex": 0, 15 | // disallow use of debugger 16 | "no-debugger": 0, 17 | // disallow duplicate arguments in functions 18 | "no-dupe-args": 0, 19 | // disallow duplicate keys when creating object literals 20 | "no-dupe-keys": 0, 21 | // disallow a duplicate case label. 22 | "no-duplicate-case": 0, 23 | // disallow the use of empty character classes in regular expressions 24 | "no-empty-character-class": 0, 25 | // disallow empty statements 26 | "no-empty": 0, 27 | // disallow assigning to the exception in a catch block 28 | "no-ex-assign": 0, 29 | // disallow double-negation boolean casts in a boolean context 30 | "no-extra-boolean-cast": 0, 31 | // disallow unnecessary parentheses 32 | "no-extra-parens": 2, 33 | // disallow unnecessary semicolons 34 | "no-extra-semi": 0, 35 | // disallow overwriting functions written as function declarations 36 | "no-func-assign": 0, 37 | // disallow function or variable declarations in nested blocks 38 | "no-inner-declarations": [2, "functions"], 39 | // disallow invalid regular expression strings in the RegExp constructor 40 | "no-invalid-regexp": 0, 41 | // disallow irregular whitespace outside of strings and comments 42 | "no-irregular-whitespace": 0, 43 | // disallow negation of the left operand of an in expression 44 | "no-negated-in-lhs": 0, 45 | // disallow the use of object properties of the global object (Math and JSON) as functions 46 | "no-obj-calls": 0, 47 | // disallow multiple spaces in a regular expression literal 48 | "no-regex-spaces": 0, 49 | // disallow sparse arrays 50 | "no-sparse-arrays": 0, 51 | // Avoid code that looks like two expressions but is actually one 52 | "no-unexpected-multiline": 0, 53 | // disallow unreachable statements after a return, throw, continue, or break statement 54 | "no-unreachable": 0, 55 | // disallow comparisons with the value NaN 56 | "use-isnan": 0, 57 | // ensure JSDoc comments are valid 58 | "valid-jsdoc": 2, 59 | // ensure that the results of typeof are compared against a valid string 60 | "valid-typeof": 0 61 | } 62 | }; 63 | -------------------------------------------------------------------------------- /rules/eslint/errors/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // disallow trailing commas in object literals 6 | "comma-dangle": 0, 7 | // disallow assignment in conditional expressions 8 | "no-cond-assign": 0, 9 | // disallow use of console 10 | "no-console": 0, 11 | // disallow use of constant expressions in conditions 12 | "no-constant-condition": 0, 13 | // disallow control characters in regular expressions 14 | "no-control-regex": 0, 15 | // disallow use of debugger 16 | "no-debugger": 0, 17 | // disallow duplicate arguments in functions 18 | "no-dupe-args": 0, 19 | // disallow duplicate keys when creating object literals 20 | "no-dupe-keys": 0, 21 | // disallow a duplicate case label. 22 | "no-duplicate-case": 0, 23 | // disallow the use of empty character classes in regular expressions 24 | "no-empty-character-class": 0, 25 | // disallow empty statements 26 | "no-empty": 0, 27 | // disallow assigning to the exception in a catch block 28 | "no-ex-assign": 0, 29 | // disallow double-negation boolean casts in a boolean context 30 | "no-extra-boolean-cast": 0, 31 | // disallow unnecessary parentheses 32 | "no-extra-parens": 0, 33 | // disallow unnecessary semicolons 34 | "no-extra-semi": 0, 35 | // disallow overwriting functions written as function declarations 36 | "no-func-assign": 0, 37 | // disallow function or variable declarations in nested blocks 38 | "no-inner-declarations": 0, 39 | // disallow invalid regular expression strings in the RegExp constructor 40 | "no-invalid-regexp": 0, 41 | // disallow irregular whitespace outside of strings and comments 42 | "no-irregular-whitespace": 0, 43 | // disallow negation of the left operand of an in expression 44 | "no-negated-in-lhs": 0, 45 | // disallow the use of object properties of the global object (Math and JSON) as functions 46 | "no-obj-calls": 0, 47 | // disallow multiple spaces in a regular expression literal 48 | "no-regex-spaces": 0, 49 | // disallow sparse arrays 50 | "no-sparse-arrays": 0, 51 | // Avoid code that looks like two expressions but is actually one 52 | "no-unexpected-multiline": 0, 53 | // disallow unreachable statements after a return, throw, continue, or break statement 54 | "no-unreachable": 0, 55 | // disallow comparisons with the value NaN 56 | "use-isnan": 0, 57 | // ensure JSDoc comments are valid 58 | "valid-jsdoc": 0, 59 | // ensure that the results of typeof are compared against a valid string 60 | "valid-typeof": 0 61 | // Avoid code that looks like two expressions but is actually one 62 | } 63 | }; 64 | -------------------------------------------------------------------------------- /rules/eslint/errors/node-runtime.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // disallow trailing commas in object literals 6 | "comma-dangle": 0, 7 | // disallow assignment in conditional expressions 8 | "no-cond-assign": 0, 9 | // disallow use of console 10 | "no-console": 0, 11 | // disallow use of constant expressions in conditions 12 | "no-constant-condition": 0, 13 | // disallow control characters in regular expressions 14 | "no-control-regex": 2, 15 | // disallow use of debugger 16 | "no-debugger": 2, 17 | // disallow duplicate arguments in functions 18 | "no-dupe-args": 2, 19 | // disallow duplicate keys when creating object literals 20 | "no-dupe-keys": 2, 21 | // disallow a duplicate case label. 22 | "no-duplicate-case": 2, 23 | // disallow the use of empty character classes in regular expressions 24 | "no-empty-character-class": 2, 25 | // disallow empty statements 26 | "no-empty": 0, 27 | // disallow assigning to the exception in a catch block 28 | "no-ex-assign": 2, 29 | // disallow double-negation boolean casts in a boolean context 30 | "no-extra-boolean-cast": 2, 31 | // disallow unnecessary parentheses 32 | "no-extra-parens": 0, 33 | // disallow unnecessary semicolons 34 | "no-extra-semi": 2, 35 | // disallow overwriting functions written as function declarations 36 | "no-func-assign": 0, 37 | // disallow function or variable declarations in nested blocks 38 | "no-inner-declarations": 0, 39 | // disallow invalid regular expression strings in the RegExp constructor 40 | "no-invalid-regexp": 2, 41 | // disallow irregular whitespace outside of strings and comments 42 | "no-irregular-whitespace": 2, 43 | // disallow negation of the left operand of an in expression 44 | "no-negated-in-lhs": 0, 45 | // disallow the use of object properties of the global object (Math and JSON) as functions 46 | "no-obj-calls": 0, 47 | // disallow multiple spaces in a regular expression literal 48 | "no-regex-spaces": 0, 49 | // disallow sparse arrays 50 | "no-sparse-arrays": 0, 51 | // Avoid code that looks like two expressions but is actually one 52 | "no-unexpected-multiline": 2, 53 | // disallow unreachable statements after a return, throw, continue, or break statement 54 | "no-unreachable": 2, 55 | // disallow comparisons with the value NaN 56 | "use-isnan": 0, 57 | // ensure JSDoc comments are valid 58 | "valid-jsdoc": 0, 59 | // ensure that the results of typeof are compared against a valid string 60 | "valid-typeof": 2 61 | // Avoid code that looks like two expressions but is actually one 62 | } 63 | }; 64 | -------------------------------------------------------------------------------- /rules/eslint/errors/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // disallow trailing commas in object literals 6 | "comma-dangle": 0, 7 | // disallow assignment in conditional expressions 8 | "no-cond-assign": 0, 9 | // disallow use of console 10 | "no-console": 0, 11 | // disallow use of constant expressions in conditions 12 | "no-constant-condition": 0, 13 | // disallow control characters in regular expressions 14 | "no-control-regex": 0, 15 | // disallow use of debugger 16 | "no-debugger": 0, 17 | // disallow duplicate arguments in functions 18 | "no-dupe-args": 0, 19 | // disallow duplicate keys when creating object literals 20 | "no-dupe-keys": 0, 21 | // disallow a duplicate case label. 22 | "no-duplicate-case": 0, 23 | // disallow the use of empty character classes in regular expressions 24 | "no-empty-character-class": 0, 25 | // disallow empty statements 26 | "no-empty": 0, 27 | // disallow assigning to the exception in a catch block 28 | "no-ex-assign": 0, 29 | // disallow double-negation boolean casts in a boolean context 30 | "no-extra-boolean-cast": 0, 31 | // disallow unnecessary parentheses 32 | "no-extra-parens": 0, 33 | // disallow unnecessary semicolons 34 | "no-extra-semi": 0, 35 | // disallow overwriting functions written as function declarations 36 | "no-func-assign": 0, 37 | // disallow function or variable declarations in nested blocks 38 | "no-inner-declarations": 0, 39 | // disallow invalid regular expression strings in the RegExp constructor 40 | "no-invalid-regexp": 0, 41 | // disallow irregular whitespace outside of strings and comments 42 | "no-irregular-whitespace": 0, 43 | // disallow negation of the left operand of an in expression 44 | "no-negated-in-lhs": 0, 45 | // disallow the use of object properties of the global object (Math and JSON) as functions 46 | "no-obj-calls": 0, 47 | // disallow multiple spaces in a regular expression literal 48 | "no-regex-spaces": 0, 49 | // disallow sparse arrays 50 | "no-sparse-arrays": 0, 51 | // Avoid code that looks like two expressions but is actually one 52 | "no-unexpected-multiline": 0, 53 | // disallow unreachable statements after a return, throw, continue, or break statement 54 | "no-unreachable": 0, 55 | // disallow comparisons with the value NaN 56 | "use-isnan": 0, 57 | // ensure JSDoc comments are valid 58 | "valid-jsdoc": 0, 59 | // ensure that the results of typeof are compared against a valid string 60 | "valid-typeof": 0 61 | // Avoid code that looks like two expressions but is actually one 62 | } 63 | }; 64 | -------------------------------------------------------------------------------- /rules/eslint/errors/walmart.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // disallow trailing commas in object literals 6 | "comma-dangle": [2, "never"], 7 | // disallow assignment in conditional expressions 8 | "no-cond-assign": 2, 9 | // disallow use of console 10 | "no-console": 2, 11 | // disallow use of constant expressions in conditions 12 | "no-constant-condition": 2, 13 | // disallow control characters in regular expressions 14 | "no-control-regex": 2, 15 | // disallow use of debugger 16 | "no-debugger": 2, 17 | // disallow duplicate arguments in functions 18 | "no-dupe-args": 2, 19 | // disallow duplicate keys when creating object literals 20 | "no-dupe-keys": 2, 21 | // disallow a duplicate case label. 22 | "no-duplicate-case": 2, 23 | // disallow the use of empty character classes in regular expressions 24 | "no-empty-character-class": 2, 25 | // disallow empty statements 26 | "no-empty": 2, 27 | // disallow assigning to the exception in a catch block 28 | "no-ex-assign": 2, 29 | // disallow double-negation boolean casts in a boolean context 30 | "no-extra-boolean-cast": 2, 31 | // disallow unnecessary parentheses 32 | "no-extra-parens": 2, 33 | // disallow unnecessary semicolons 34 | "no-extra-semi": 2, 35 | // disallow overwriting functions written as function declarations 36 | "no-func-assign": 2, 37 | // disallow function or variable declarations in nested blocks 38 | "no-inner-declarations": [2, "functions"], 39 | // disallow invalid regular expression strings in the RegExp constructor 40 | "no-invalid-regexp": 2, 41 | // disallow irregular whitespace outside of strings and comments 42 | "no-irregular-whitespace": 2, 43 | // disallow negation of the left operand of an in expression 44 | "no-negated-in-lhs": 2, 45 | // disallow the use of object properties of the global object (Math and JSON) as functions 46 | "no-obj-calls": 2, 47 | // disallow multiple spaces in a regular expression literal 48 | "no-regex-spaces": 2, 49 | // disallow sparse arrays 50 | "no-sparse-arrays": 2, 51 | // Avoid code that looks like two expressions but is actually one 52 | "no-unexpected-multiline": 2, 53 | // disallow unreachable statements after a return, throw, continue, or break statement 54 | "no-unreachable": 2, 55 | // disallow comparisons with the value NaN 56 | "use-isnan": 2, 57 | // ensure JSDoc comments are valid 58 | "valid-jsdoc": 2, 59 | // ensure that the results of typeof are compared against a valid string 60 | "valid-typeof": 2 61 | } 62 | }; 63 | -------------------------------------------------------------------------------- /rules/eslint/es6/airbnb.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "es6": false 6 | }, 7 | "ecmaFeatures": { 8 | "arrowFunctions": true, 9 | "blockBindings": true, 10 | "classes": true, 11 | "defaultParams": true, 12 | "destructuring": true, 13 | "forOf": true, 14 | "generators": false, 15 | "modules": true, 16 | "objectLiteralComputedProperties": true, 17 | "objectLiteralDuplicateProperties": false, 18 | "objectLiteralShorthandMethods": true, 19 | "objectLiteralShorthandProperties": true, 20 | "restParams": true, 21 | "spread": true, 22 | "superInFunctions": true, 23 | "templateStrings": true, 24 | "jsx": true 25 | }, 26 | "rules": { 27 | // require braces in arrow function body 28 | "arrow-body-style": [2, "as-needed"], 29 | // require parens in arrow function arguments 30 | "arrow-parens": 0, 31 | // require space before/after arrow function's arrow 32 | "arrow-spacing": [2, { "before": true, "after": true }], 33 | // verify super() callings in constructors 34 | "constructor-super": 0, 35 | // enforce the spacing around the * in generator functions 36 | "generator-star-spacing": 0, 37 | // disallow arrow functions where a condition is expected 38 | "no-arrow-condition": 0, 39 | // disallow modifying variables of class declarations 40 | "no-class-assign": 0, 41 | // disallow modifying variables that are declared using const 42 | "no-const-assign": 2, 43 | // disallow duplicate name in class members 44 | "no-dupe-class-members": 0, 45 | // disallow to use this/super before super() calling in constructors. 46 | "no-this-before-super": 0, 47 | // require let or const instead of var 48 | "no-var": 2, 49 | // require method and property shorthand syntax for object literals 50 | "object-shorthand": [2, "always"], 51 | // suggest using arrow functions as callbacks 52 | "prefer-arrow-callback": 2, 53 | // suggest using of const declaration for variables that are never modified after declared 54 | "prefer-const": 2, 55 | // suggest using Reflect methods where applicable 56 | "prefer-reflect": 0, 57 | // suggest using the spread operator instead of .apply() 58 | "prefer-spread": 0, 59 | // suggest using template literals instead of strings concatenation 60 | "prefer-template": 2, 61 | // disallow generator functions that do not have yield 62 | "require-yield": 0 63 | } 64 | }; 65 | -------------------------------------------------------------------------------- /rules/eslint/es6/eslint.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "es6": false 6 | }, 7 | "ecmaFeatures": { 8 | "modules": false 9 | }, 10 | "rules": { 11 | // require braces in arrow function body 12 | "arrow-body-style": 0, 13 | // require parens in arrow function arguments 14 | "arrow-parens": 0, 15 | // require space before/after arrow function's arrow 16 | "arrow-spacing": 0, 17 | // verify super() callings in constructors 18 | "constructor-super": 0, 19 | // enforce the spacing around the * in generator functions 20 | "generator-star-spacing": 0, 21 | // disallow arrow functions where a condition is expected 22 | "no-arrow-condition": 0, 23 | // disallow modifying variables of class declarations 24 | "no-class-assign": 0, 25 | // disallow modifying variables that are declared using const 26 | "no-const-assign": 0, 27 | // disallow duplicate name in class members 28 | "no-dupe-class-members": 0, 29 | // disallow to use this/super before super() calling in constructors. 30 | "no-this-before-super": 0, 31 | // require let or const instead of var 32 | "no-var": 0, 33 | // require method and property shorthand syntax for object literals 34 | "object-shorthand": 0, 35 | // suggest using arrow functions as callbacks 36 | "prefer-arrow-callback": 0, 37 | // suggest using of const declaration for variables that are never modified after declared 38 | "prefer-const": 0, 39 | // suggest using Reflect methods where applicable 40 | "prefer-reflect": 0, 41 | // suggest using the spread operator instead of .apply() 42 | "prefer-spread": 0, 43 | // suggest using template literals instead of strings concatenation 44 | "prefer-template": 0, 45 | // disallow generator functions that do not have yield 46 | "require-yield": 0 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /rules/eslint/es6/google.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "es6": false 6 | }, 7 | "ecmaFeatures": { 8 | "modules": false 9 | }, 10 | "rules": { 11 | // require braces in arrow function body 12 | "arrow-body-style": 0, 13 | // require parens in arrow function arguments 14 | "arrow-parens": 0, 15 | // require space before/after arrow function's arrow 16 | "arrow-spacing": 0, 17 | // verify super() callings in constructors 18 | "constructor-super": 0, 19 | // enforce the spacing around the * in generator functions 20 | "generator-star-spacing": 0, 21 | // disallow arrow functions where a condition is expected 22 | "no-arrow-condition": 0, 23 | // disallow modifying variables of class declarations 24 | "no-class-assign": 0, 25 | // disallow modifying variables that are declared using const 26 | "no-const-assign": 0, 27 | // disallow duplicate name in class members 28 | "no-dupe-class-members": 0, 29 | // disallow to use this/super before super() calling in constructors. 30 | "no-this-before-super": 0, 31 | // require let or const instead of var 32 | "no-var": 0, 33 | // require method and property shorthand syntax for object literals 34 | "object-shorthand": 0, 35 | // suggest using arrow functions as callbacks 36 | "prefer-arrow-callback": 0, 37 | // suggest using of const declaration for variables that are never modified after declared 38 | "prefer-const": 0, 39 | // suggest using Reflect methods where applicable 40 | "prefer-reflect": 0, 41 | // suggest using the spread operator instead of .apply() 42 | "prefer-spread": 0, 43 | // suggest using template literals instead of strings concatenation 44 | "prefer-template": 0, 45 | // disallow generator functions that do not have yield 46 | "require-yield": 0 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /rules/eslint/es6/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "es6": false 6 | }, 7 | "ecmaFeatures": { 8 | "modules": false 9 | }, 10 | "rules": { 11 | // require braces in arrow function body 12 | "arrow-body-style": 0, 13 | // require parens in arrow function arguments 14 | "arrow-parens": 0, 15 | // require space before/after arrow function's arrow 16 | "arrow-spacing": 0, 17 | // verify super() callings in constructors 18 | "constructor-super": 0, 19 | // enforce the spacing around the * in generator functions 20 | "generator-star-spacing": 0, 21 | // disallow arrow functions where a condition is expected 22 | "no-arrow-condition": 0, 23 | // disallow modifying variables of class declarations 24 | "no-class-assign": 0, 25 | // disallow modifying variables that are declared using const 26 | "no-const-assign": 0, 27 | // disallow duplicate name in class members 28 | "no-dupe-class-members": 0, 29 | // disallow to use this/super before super() calling in constructors. 30 | "no-this-before-super": 0, 31 | // require let or const instead of var 32 | "no-var": 0, 33 | // require method and property shorthand syntax for object literals 34 | "object-shorthand": 0, 35 | // suggest using arrow functions as callbacks 36 | "prefer-arrow-callback": 0, 37 | // suggest using of const declaration for variables that are never modified after declared 38 | "prefer-const": 0, 39 | // suggest using Reflect methods where applicable 40 | "prefer-reflect": 0, 41 | // suggest using the spread operator instead of .apply() 42 | "prefer-spread": 0, 43 | // suggest using template literals instead of strings concatenation 44 | "prefer-template": 0, 45 | // disallow generator functions that do not have yield 46 | "require-yield": 0 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /rules/eslint/es6/node-runtime.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "es6": false 6 | }, 7 | "ecmaFeatures": { 8 | "arrowFunctions": true, 9 | "binaryLiterals": true, 10 | "blockBindings": true, 11 | "classes": true, 12 | "forOf": true, 13 | "generators": true, 14 | "objectLiteralShorthandMethods": true, 15 | "objectLiteralShorthandProperties": true, 16 | "octalLiterals": true, 17 | "templateStrings": true 18 | }, 19 | "rules": { 20 | // require braces in arrow function body 21 | "arrow-body-style": 0, 22 | // require parens in arrow function arguments 23 | "arrow-parens": [2, "always"], 24 | // require space before/after arrow function's arrow 25 | "arrow-spacing": [2, {"before": true, "after": true}], 26 | // verify super() callings in constructors 27 | "constructor-super": 0, 28 | // enforce the spacing around the * in generator functions 29 | "generator-star-spacing": 0, 30 | // disallow arrow functions where a condition is expected 31 | "no-arrow-condition": 2, 32 | // disallow modifying variables of class declarations 33 | "no-class-assign": 0, 34 | // disallow modifying variables that are declared using const 35 | "no-const-assign": 0, 36 | // disallow duplicate name in class members 37 | "no-dupe-class-members": 0, 38 | // disallow to use this/super before super() calling in constructors. 39 | "no-this-before-super": 0, 40 | // require let or const instead of var 41 | "no-var": 0, 42 | // require method and property shorthand syntax for object literals 43 | "object-shorthand": 0, 44 | // suggest using arrow functions as callbacks 45 | "prefer-arrow-callback": 0, 46 | // suggest using of const declaration for variables that are never modified after declared 47 | "prefer-const": 2, 48 | // suggest using Reflect methods where applicable 49 | "prefer-reflect": 0, 50 | // suggest using the spread operator instead of .apply() 51 | "prefer-spread": 0, 52 | // suggest using template literals instead of strings concatenation 53 | "prefer-template": 0, 54 | // disallow generator functions that do not have yield 55 | "require-yield": 0 56 | } 57 | }; 58 | -------------------------------------------------------------------------------- /rules/eslint/es6/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "es6": false 6 | }, 7 | "ecmaFeatures": { 8 | "modules": false 9 | }, 10 | "rules": { 11 | // require braces in arrow function body 12 | "arrow-body-style": 0, 13 | // require parens in arrow function arguments 14 | "arrow-parens": 0, 15 | // require space before/after arrow function's arrow 16 | "arrow-spacing": 0, 17 | // verify super() callings in constructors 18 | "constructor-super": 0, 19 | // enforce the spacing around the * in generator functions 20 | "generator-star-spacing": 0, 21 | // disallow arrow functions where a condition is expected 22 | "no-arrow-condition": 0, 23 | // disallow modifying variables of class declarations 24 | "no-class-assign": 0, 25 | // disallow modifying variables that are declared using const 26 | "no-const-assign": 0, 27 | // disallow duplicate name in class members 28 | "no-dupe-class-members": 0, 29 | // disallow to use this/super before super() calling in constructors. 30 | "no-this-before-super": 0, 31 | // require let or const instead of var 32 | "no-var": 0, 33 | // require method and property shorthand syntax for object literals 34 | "object-shorthand": 0, 35 | // suggest using arrow functions as callbacks 36 | "prefer-arrow-callback": 0, 37 | // suggest using of const declaration for variables that are never modified after declared 38 | "prefer-const": 0, 39 | // suggest using Reflect methods where applicable 40 | "prefer-reflect": 0, 41 | // suggest using the spread operator instead of .apply() 42 | "prefer-spread": 0, 43 | // suggest using template literals instead of strings concatenation 44 | "prefer-template": 0, 45 | // disallow generator functions that do not have yield 46 | "require-yield": 0 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /rules/eslint/es6/walmart.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "es6": true 6 | }, 7 | "ecmaFeatures": { 8 | "modules": true 9 | }, 10 | "rules": { 11 | // require braces in arrow function body 12 | "arrow-body-style": 0, 13 | // require parens in arrow function arguments 14 | "arrow-parens": 2, 15 | // require space before/after arrow function's arrow 16 | "arrow-spacing": 2, 17 | // verify super() callings in constructors 18 | "constructor-super": 2, 19 | // enforce the spacing around the * in generator functions 20 | "generator-star-spacing": 2, 21 | // disallow arrow functions where a condition is expected 22 | "no-arrow-condition": 2, 23 | // disallow modifying variables of class declarations 24 | "no-class-assign": 2, 25 | // disallow modifying variables that are declared using const 26 | "no-const-assign": 2, 27 | // disallow duplicate name in class members 28 | "no-dupe-class-members": 2, 29 | // disallow to use this/super before super() calling in constructors. 30 | "no-this-before-super": 2, 31 | // require let or const instead of var 32 | "no-var": 2, 33 | // require method and property shorthand syntax for object literals 34 | "object-shorthand": 2, 35 | // suggest using arrow functions as callbacks 36 | "prefer-arrow-callback": 1, 37 | // suggest using of const declaration for variables that are never modified after declared 38 | "prefer-const": 2, 39 | // suggest using Reflect methods where applicable 40 | "prefer-reflect": 0, 41 | // suggest using the spread operator instead of .apply() 42 | "prefer-spread": 2, 43 | // suggest using template literals instead of strings concatenation 44 | "prefer-template": 1, 45 | // disallow generator functions that do not have yield 46 | "require-yield": 2 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /rules/eslint/node/airbnb.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "node": true 6 | }, 7 | "rules": { 8 | // enforce return after a callback 9 | "callback-return": 0, 10 | // disallow require() outside of the top-level module scope 11 | "global-require": 0, 12 | // enforces error handling in callbacks (node environment) 13 | "handle-callback-err": 0, 14 | // disallow mixing regular variable and require declarations 15 | "no-mixed-requires": [0, false], 16 | // disallow use of new operator with the require function 17 | "no-new-require": 0, 18 | // disallow string concatenation with __dirname and __filename 19 | "no-path-concat": 0, 20 | // disallow process.exit() 21 | "no-process-exit": 0, 22 | // restrict usage of specified node modules 23 | "no-restricted-modules": 0, 24 | // disallow use of synchronous methods (off by default) 25 | "no-sync": 0 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /rules/eslint/node/eslint.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "node": false 6 | }, 7 | "rules": { 8 | // enforce return after a callback 9 | "callback-return": 0, 10 | // disallow require() outside of the top-level module scope 11 | "global-require": 0, 12 | // enforces error handling in callbacks (node environment) 13 | "handle-callback-err": 0, 14 | // disallow mixing regular variable and require declarations 15 | "no-mixed-requires": [0, false], 16 | // disallow use of new operator with the require function 17 | "no-new-require": 0, 18 | // disallow string concatenation with __dirname and __filename 19 | "no-path-concat": 0, 20 | // disallow process.exit() 21 | "no-process-exit": 0, 22 | // restrict usage of specified node modules 23 | "no-restricted-modules": 0, 24 | // disallow use of synchronous methods (off by default) 25 | "no-sync": 0 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /rules/eslint/node/google.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "node": false 6 | }, 7 | "rules": { 8 | // enforce return after a callback 9 | "callback-return": 0, 10 | // disallow require() outside of the top-level module scope 11 | "global-require": 0, 12 | // enforces error handling in callbacks (node environment) 13 | "handle-callback-err": 0, 14 | // disallow mixing regular variable and require declarations 15 | "no-mixed-requires": 0, 16 | // disallow use of new operator with the require function 17 | "no-new-require": 0, 18 | // disallow string concatenation with __dirname and __filename 19 | "no-path-concat": 0, 20 | // disallow process.exit() 21 | "no-process-exit": 0, 22 | // restrict usage of specified node modules 23 | "no-restricted-modules": 0, 24 | // disallow use of synchronous methods (off by default) 25 | "no-sync": 0 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /rules/eslint/node/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "node": true 6 | }, 7 | "rules": { 8 | // enforce return after a callback 9 | "callback-return": 0, 10 | // disallow require() outside of the top-level module scope 11 | "global-require": 0, 12 | // enforces error handling in callbacks (node environment) 13 | "handle-callback-err": 0, 14 | // disallow mixing regular variable and require declarations 15 | "no-mixed-requires": 0, 16 | // disallow use of new operator with the require function 17 | "no-new-require": 0, 18 | // disallow string concatenation with __dirname and __filename 19 | "no-path-concat": 0, 20 | // disallow process.exit() 21 | "no-process-exit": 0, 22 | // restrict usage of specified node modules 23 | "no-restricted-modules": 0, 24 | // disallow use of synchronous methods (off by default) 25 | "no-sync": 0 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /rules/eslint/node/node-runtime.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "node": true 6 | }, 7 | "rules": { 8 | // enforce return after a callback 9 | "callback-return": 0, 10 | // disallow require() outside of the top-level module scope 11 | "global-require": 0, 12 | // enforces error handling in callbacks (node environment) 13 | "handle-callback-err": 0, 14 | // disallow mixing regular variable and require declarations 15 | "no-mixed-requires": 0, 16 | // disallow use of new operator with the require function 17 | "no-new-require": 0, 18 | // disallow string concatenation with __dirname and __filename 19 | "no-path-concat": 0, 20 | // disallow process.exit() 21 | "no-process-exit": 0, 22 | // restrict usage of specified node modules 23 | "no-restricted-modules": 0, 24 | // disallow use of synchronous methods (off by default) 25 | "no-sync": 0 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /rules/eslint/node/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "node": false 6 | }, 7 | "rules": { 8 | // enforce return after a callback 9 | "callback-return": 0, 10 | // disallow require() outside of the top-level module scope 11 | "global-require": 0, 12 | // enforces error handling in callbacks (node environment) 13 | "handle-callback-err": 0, 14 | // disallow mixing regular variable and require declarations 15 | "no-mixed-requires": 0, 16 | // disallow use of new operator with the require function 17 | "no-new-require": 0, 18 | // disallow string concatenation with __dirname and __filename 19 | "no-path-concat": 0, 20 | // disallow process.exit() 21 | "no-process-exit": 0, 22 | // restrict usage of specified node modules 23 | "no-restricted-modules": 0, 24 | // disallow use of synchronous methods (off by default) 25 | "no-sync": 0 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /rules/eslint/node/walmart.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "env": { 5 | "node": true 6 | }, 7 | "rules": { 8 | // enforce return after a callback 9 | "callback-return": 2, 10 | // disallow require() outside of the top-level module scope 11 | "global-require": 1, 12 | // enforces error handling in callbacks (node environment) 13 | "handle-callback-err": 0, 14 | // disallow mixing regular variable and require declarations 15 | "no-mixed-requires": 2, 16 | // disallow use of new operator with the require function 17 | "no-new-require": 2, 18 | // disallow string concatenation with __dirname and __filename 19 | "no-path-concat": 0, 20 | // disallow process.exit() 21 | "no-process-exit": 2, 22 | // restrict usage of specified node modules 23 | "no-restricted-modules": 0, 24 | // disallow use of synchronous methods (off by default) 25 | "no-sync": 0 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /rules/eslint/strict/airbnb.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // require that all functions are run in strict mode 6 | "strict": [2, "never"] 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /rules/eslint/strict/eslint.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // require that all functions are run in strict mode 6 | "strict": 0 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /rules/eslint/strict/google.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // require that all functions are run in strict mode 6 | "strict": 0 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /rules/eslint/strict/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // require that all functions are run in strict mode 6 | "strict": 0 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /rules/eslint/strict/node-runtime.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // require that all functions are run in strict mode 6 | "strict": [2, "global"] 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /rules/eslint/strict/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // require that all functions are run in strict mode 6 | "strict": 0 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /rules/eslint/strict/walmart.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // require that all functions are run in strict mode 6 | "strict": [2, "never"] 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /rules/eslint/style/airbnb.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce spacing inside array brackets 6 | "array-bracket-spacing": [2, "never"], 7 | // disallow or enforce spaces inside of single line blocks 8 | "block-spacing": 0, 9 | // enforce one true brace style 10 | "brace-style": [2, "1tbs", { "allowSingleLine": true }], 11 | // require camel case names 12 | "camelcase": [2, {"properties": "never"}], 13 | // enforce spacing before and after comma 14 | "comma-spacing": [2, {"before": false, "after": true}], 15 | // enforce one true comma style 16 | "comma-style": [2, "last"], 17 | // require or disallow padding inside computed properties 18 | "computed-property-spacing": [2, "never"], 19 | // enforces consistent naming when capturing the current execution context 20 | "consistent-this": 0, 21 | // enforce newline at the end of file, with no multiple empty lines 22 | "eol-last": 2, 23 | // require function expressions to have a name 24 | "func-names": 1, 25 | // enforces use of function declarations or expressions 26 | "func-style": 0, 27 | // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) 28 | "id-length": 0, 29 | // require identifiers to match the provided regular expression 30 | "id-match": 0, 31 | // this option sets a specific tab width for your code 32 | "indent": [2, 2, { "SwitchCase": 1, "VariableDeclarator": 1 }], 33 | // specify whether double or single quotes should be used in JSX attributes 34 | "jsx-quotes": [2, "prefer-double"], 35 | // enforces spacing between keys and values in object literal properties 36 | "key-spacing": [2, {"beforeColon": false, "afterColon": true}], 37 | // disallow mixed "LF" and "CRLF" as linebreaks 38 | "linebreak-style": 0, 39 | // enforces empty lines around comments 40 | "lines-around-comment": 0, 41 | // specify the maximum depth that blocks can be nested 42 | "max-depth": [0, 4], 43 | // specify the maximum length of a line in your program 44 | "max-len": [2, 100, 2, { 45 | "ignoreUrls": true, 46 | "ignoreComments": false 47 | }], 48 | // specify the maximum depth callbacks can be nested 49 | "max-nested-callbacks": 0, 50 | // limits the number of parameters that can be used in the function declaration. 51 | "max-params": [0, 3], 52 | // specify the maximum number of statement allowed in a function 53 | "max-statements": [0, 10], 54 | // require a capital letter for constructors 55 | "new-cap": [2, {"newIsCap": true}], 56 | // disallow the omission of parentheses when invoking a constructor with no arguments 57 | "new-parens": 0, 58 | // allow/disallow an empty newline after var statement 59 | "newline-after-var": 0, 60 | // disallow use of the Array constructor 61 | "no-array-constructor": 0, 62 | // disallow use of bitwise operators 63 | "no-bitwise": 0, 64 | // disallow use of the continue statement 65 | "no-continue": 0, 66 | // disallow comments inline after code 67 | "no-inline-comments": 0, 68 | // disallow if as the only statement in an else block 69 | "no-lonely-if": 0, 70 | // disallow mixed spaces and tabs for indentation 71 | "no-mixed-spaces-and-tabs": 2, 72 | // disallow multiple empty lines 73 | "no-multiple-empty-lines": [2, {"max": 2, "maxEOF": 1}], 74 | // disallow negated conditions 75 | "no-negated-condition": 0, 76 | // disallow nested ternary expressions 77 | "no-nested-ternary": 2, 78 | // disallow use of the Object constructor 79 | "no-new-object": 2, 80 | // disallow use of unary operators, ++ and -- 81 | "no-plusplus": 0, 82 | // disallow use of certain syntax in code 83 | "no-restricted-syntax": 0, 84 | // disallow space between function identifier and application 85 | "no-spaced-func": 2, 86 | // disallow the use of ternary operators 87 | "no-ternary": 0, 88 | // disallow trailing whitespace at the end of lines 89 | "no-trailing-spaces": 2, 90 | // disallow dangling underscores in identifiers 91 | "no-underscore-dangle": 0, 92 | // disallow the use of Boolean literals in conditional expressions 93 | "no-unneeded-ternary": [2, { "defaultAssignment": false }], 94 | // require or disallow padding inside curly braces 95 | "object-curly-spacing": [2, "always"], 96 | // allow just one var statement per function 97 | "one-var": [2, "never"], 98 | // require assignment operator shorthand where possible or prohibit it entirely 99 | "operator-assignment": 0, 100 | // enforce operators to be placed before or after line breaks 101 | "operator-linebreak": 0, 102 | // enforce padding within blocks 103 | "padded-blocks": [2, "never"], 104 | // require quotes around object literal property names 105 | "quote-props": [2, "as-needed", { "keywords": false, "unnecessary": true, "numbers": false }], 106 | // specify whether double or single quotes should be used 107 | "quotes": [2, "single", "avoid-escape"], 108 | // Require JSDoc comment 109 | "require-jsdoc": 0, 110 | // enforce spacing before and after semicolons 111 | "semi-spacing": [2, {"before": false, "after": true}], 112 | // require or disallow use of semicolons instead of ASI 113 | "semi": [2, "always"], 114 | // sort variables within the same declaration block 115 | "sort-vars": 0, 116 | // require a space before/after certain keywords 117 | "keyword-spacing": [2, {"before": false, "after": true}], 118 | // require or disallow space before blocks 119 | "space-before-blocks": 2, 120 | // require or disallow space before function opening parenthesis 121 | "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], 122 | // require or disallow spaces inside parentheses 123 | "space-in-parens": [2, "never"], 124 | // require spaces around operators 125 | "space-infix-ops": 2, 126 | // Require or disallow spaces before/after unary operators 127 | "space-unary-ops": 0, 128 | // require or disallow a space immediately following the // or /* in a comment 129 | "spaced-comment": [2, "always", { 130 | "exceptions": ["-", "+"], 131 | "markers": ["=", "!"] // space here to support sprockets directives 132 | }], 133 | // require regex literals to be wrapped in parentheses 134 | "wrap-regex": 0 135 | } 136 | }; 137 | -------------------------------------------------------------------------------- /rules/eslint/style/eslint.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce spacing inside array brackets 6 | "array-bracket-spacing": [0, "never"], 7 | // disallow or enforce spaces inside of single line blocks 8 | "block-spacing": 0, 9 | // enforce one true brace style 10 | "brace-style": [0, "1tbs"], 11 | // require camel case names 12 | "camelcase": 0, 13 | // enforce spacing before and after comma 14 | "comma-spacing": 0, 15 | // enforce one true comma style 16 | "comma-style": 0, 17 | // require or disallow padding inside computed properties 18 | "computed-property-spacing": [0, "never"], 19 | // enforces consistent naming when capturing the current execution context 20 | "consistent-this": [0, "that"], 21 | // enforce newline at the end of file, with no multiple empty lines 22 | "eol-last": 0, 23 | // require function expressions to have a name 24 | "func-names": 0, 25 | // enforces use of function declarations or expressions 26 | "func-style": [0, "declaration"], 27 | // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) 28 | "id-length": 0, 29 | // require identifiers to match the provided regular expression 30 | "id-match": 0, 31 | // this option sets a specific tab width for your code 32 | "indent": 0, 33 | // specify whether double or single quotes should be used in JSX attributes 34 | "jsx-quotes": 0, 35 | // enforces spacing between keys and values in object literal properties 36 | "key-spacing": [0, { "beforeColon": false, "afterColon": true }], 37 | // disallow mixed "LF" and "CRLF" as linebreaks 38 | "linebreak-style": [0, "unix"], 39 | // enforces empty lines around comments 40 | "lines-around-comment": 0, 41 | // specify the maximum depth that blocks can be nested 42 | "max-depth": [0, 4], 43 | // specify the maximum length of a line in your program 44 | "max-len": [0, 80, 4], 45 | // specify the maximum depth callbacks can be nested 46 | "max-nested-callbacks": [0, 2], 47 | // limits the number of parameters that can be used in the function declaration. 48 | "max-params": [0, 3], 49 | // specify the maximum number of statement allowed in a function 50 | "max-statements": [0, 10], 51 | // require a capital letter for constructors 52 | "new-cap": 0, 53 | // disallow the omission of parentheses when invoking a constructor with no arguments 54 | "new-parens": 0, 55 | // allow/disallow an empty newline after var statement 56 | "newline-after-var": 0, 57 | // disallow use of the Array constructor 58 | "no-array-constructor": 0, 59 | // disallow use of bitwise operators 60 | "no-bitwise": 0, 61 | // disallow use of the continue statement 62 | "no-continue": 0, 63 | // disallow comments inline after code 64 | "no-inline-comments": 0, 65 | // disallow if as the only statement in an else block 66 | "no-lonely-if": 0, 67 | // disallow mixed spaces and tabs for indentation 68 | "no-mixed-spaces-and-tabs": [2, false], 69 | // disallow multiple empty lines 70 | "no-multiple-empty-lines": [0, {"max": 2}], 71 | // disallow negated conditions 72 | "no-negated-condition": 0, 73 | // disallow nested ternary expressions 74 | "no-nested-ternary": 0, 75 | // disallow use of the Object constructor 76 | "no-new-object": 0, 77 | // disallow use of unary operators, ++ and -- 78 | "no-plusplus": 0, 79 | // disallow use of certain syntax in code 80 | "no-restricted-syntax": 0, 81 | // disallow space between function identifier and application 82 | "no-spaced-func": 0, 83 | // disallow the use of ternary operators 84 | "no-ternary": 0, 85 | // disallow trailing whitespace at the end of lines 86 | "no-trailing-spaces": 0, 87 | // disallow dangling underscores in identifiers 88 | "no-underscore-dangle": 0, 89 | // disallow the use of Boolean literals in conditional expressions 90 | "no-unneeded-ternary": 0, 91 | // require or disallow padding inside curly braces 92 | "object-curly-spacing": [0, "never"], 93 | // allow just one var statement per function 94 | "one-var": 0, 95 | // require assignment operator shorthand where possible or prohibit it entirely 96 | "operator-assignment": [0, "always"], 97 | // enforce operators to be placed before or after line breaks 98 | "operator-linebreak": 0, 99 | // enforce padding within blocks 100 | "padded-blocks": 0, 101 | // require quotes around object literal property names 102 | "quote-props": 0, 103 | // specify whether double or single quotes should be used 104 | "quotes": [0, "double"], 105 | // Require JSDoc comment 106 | "require-jsdoc": 0, 107 | // enforce spacing before and after semicolons 108 | "semi-spacing": [2, {"before": false, "after": true}], 109 | // require or disallow use of semicolons instead of ASI 110 | "semi": 0, 111 | // sort variables within the same declaration block 112 | "sort-vars": 0, 113 | // require a space before/after certain keywords 114 | "keyword-spacing": 0, 115 | // require or disallow space before blocks 116 | "space-before-blocks": [0, "always"], 117 | // require or disallow space before function opening parenthesis 118 | "space-before-function-paren": [0, "always"], 119 | // require or disallow spaces inside parentheses 120 | "space-in-parens": [0, "never"], 121 | // require spaces around operators 122 | "space-infix-ops": 0, 123 | // Require or disallow spaces before/after unary operators 124 | "space-unary-ops": [0, { "words": true, "nonwords": false }], 125 | // require or disallow a space immediately following the // or /* in a comment 126 | "spaced-comment": 0, 127 | // require regex literals to be wrapped in parentheses 128 | "wrap-regex": 0 129 | } 130 | }; 131 | -------------------------------------------------------------------------------- /rules/eslint/style/google.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce spacing inside array brackets 6 | "array-bracket-spacing": 0, 7 | // disallow or enforce spaces inside of single line blocks 8 | "block-spacing": 0, 9 | // enforce one true brace style 10 | "brace-style": [2, "1tbs", { "allowSingleLine": true }], 11 | // require camel case names 12 | "camelcase": 2, 13 | // enforce spacing before and after comma 14 | "comma-spacing": 0, 15 | // enforce one true comma style 16 | "comma-style": 0, 17 | // require or disallow padding inside computed properties 18 | "computed-property-spacing": 0, 19 | // enforces consistent naming when capturing the current execution context 20 | "consistent-this": 0, 21 | // enforce newline at the end of file, with no multiple empty lines 22 | "eol-last": 0, 23 | // require function expressions to have a name 24 | "func-names": 0, 25 | // enforces use of function declarations or expressions 26 | "func-style": 0, 27 | // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) 28 | "id-length": 0, 29 | // require identifiers to match the provided regular expression 30 | "id-match": 0, 31 | // this option sets a specific tab width for your code 32 | "indent": [2, 2], 33 | // specify whether double or single quotes should be used in JSX attributes 34 | "jsx-quotes": 0, 35 | // enforces spacing between keys and values in object literal properties 36 | "key-spacing": [2, { "beforeColon": false, "afterColon": true }], 37 | // disallow mixed "LF" and "CRLF" as linebreaks 38 | "linebreak-style": 0, 39 | // enforces empty lines around comments 40 | "lines-around-comment": 0, 41 | // specify the maximum depth that blocks can be nested 42 | "max-depth": 0, 43 | // specify the maximum length of a line in your program 44 | "max-len": [2, 80, 4, {ignoreComments: true, ignoreUrls: true, ignorePattern: "^\\s*var\\s.+=\\s*require\\s*\\("}], 45 | // specify the maximum depth callbacks can be nested 46 | "max-nested-callbacks": 0, 47 | // limits the number of parameters that can be used in the function declaration. 48 | "max-params": 0, 49 | // specify the maximum number of statement allowed in a function 50 | "max-statements": 0, 51 | // require a capital letter for constructors 52 | "new-cap": 2, 53 | // disallow the omission of parentheses when invoking a constructor with no arguments 54 | "new-parens": 0, 55 | // allow/disallow an empty newline after var statement 56 | "newline-after-var": 2, 57 | // disallow use of the Array constructor 58 | "no-array-constructor": 2, 59 | // disallow use of bitwise operators 60 | "no-bitwise": 0, 61 | // disallow use of the continue statement 62 | "no-continue": 0, 63 | // disallow comments inline after code 64 | "no-inline-comments": 0, 65 | // disallow if as the only statement in an else block 66 | "no-lonely-if": 0, 67 | // disallow mixed spaces and tabs for indentation 68 | "no-mixed-spaces-and-tabs": 2, 69 | // disallow multiple empty lines 70 | "no-multiple-empty-lines": 0, 71 | // disallow negated conditions 72 | "no-negated-condition": 0, 73 | // disallow nested ternary expressions 74 | "no-nested-ternary": 0, 75 | // disallow use of the Object constructor 76 | "no-new-object": 2, 77 | // disallow use of unary operators, ++ and -- 78 | "no-plusplus": 0, 79 | // disallow use of certain syntax in code 80 | "no-restricted-syntax": 0, 81 | // disallow space between function identifier and application 82 | "no-spaced-func": 2, 83 | // disallow the use of ternary operators 84 | "no-ternary": 0, 85 | // disallow trailing whitespace at the end of lines 86 | "no-trailing-spaces": 2, 87 | // disallow dangling underscores in identifiers 88 | "no-underscore-dangle": 0, 89 | // disallow the use of Boolean literals in conditional expressions 90 | "no-unneeded-ternary": 0, 91 | // require or disallow padding inside curly braces 92 | "object-curly-spacing": [2, "never"], 93 | // allow just one var statement per function 94 | "one-var": 0, 95 | // require assignment operator shorthand where possible or prohibit it entirely 96 | "operator-assignment": 0, 97 | // enforce operators to be placed before or after line breaks 98 | "operator-linebreak": [2, "after"], 99 | // enforce padding within blocks 100 | "padded-blocks": 0, 101 | // require quotes around object literal property names 102 | "quote-props": 0, 103 | // specify whether double or single quotes should be used 104 | "quotes": [2, "single"], 105 | // Require JSDoc comment 106 | "require-jsdoc": 0, 107 | // enforce spacing before and after semicolons 108 | "semi-spacing": 0, 109 | // require or disallow use of semicolons instead of ASI 110 | "semi": 2, 111 | // sort variables within the same declaration block 112 | "sort-vars": 0, 113 | // require a space before/after certain keywords 114 | "keyword-spacing": 0, 115 | // require or disallow space before blocks 116 | "space-before-blocks": [2, "always"], 117 | // require or disallow space before function opening parenthesis 118 | "space-before-function-paren": [2, "never"], 119 | // require or disallow spaces inside parentheses 120 | "space-in-parens": [2, "never"], 121 | // require spaces around operators 122 | "space-infix-ops": 2, 123 | // Require or disallow spaces before/after unary operators 124 | "space-unary-ops": 0, 125 | // require or disallow a space immediately following the // or /* in a comment 126 | "spaced-comment": 0, 127 | // require regex literals to be wrapped in parentheses 128 | "wrap-regex": 0 129 | } 130 | }; 131 | -------------------------------------------------------------------------------- /rules/eslint/style/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce spacing inside array brackets 6 | "array-bracket-spacing": [2, "never"], 7 | // disallow or enforce spaces inside of single line blocks 8 | "block-spacing": 0, 9 | // enforce one true brace style 10 | "brace-style": [2, "1tbs"], 11 | // require camel case names 12 | "camelcase": 1, 13 | // enforce spacing before and after comma 14 | "comma-spacing": 0, 15 | // enforce one true comma style 16 | "comma-style": 0, 17 | // require or disallow padding inside computed properties 18 | "computed-property-spacing": [2, "never"], 19 | // enforces consistent naming when capturing the current execution context 20 | "consistent-this": 0, 21 | // enforce newline at the end of file, with no multiple empty lines 22 | "eol-last": 2, 23 | // require function expressions to have a name 24 | "func-names": 0, 25 | // enforces use of function declarations or expressions 26 | "func-style": 0, 27 | // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) 28 | "id-length": 0, 29 | // require identifiers to match the provided regular expression 30 | "id-match": 0, 31 | // this option sets a specific tab width for your code 32 | "indent": 0, 33 | // specify whether double or single quotes should be used in JSX attributes 34 | "jsx-quotes": 0, 35 | // enforces spacing between keys and values in object literal properties 36 | "key-spacing": 0, 37 | // disallow mixed "LF" and "CRLF" as linebreaks 38 | "linebreak-style": 0, 39 | // enforces empty lines around comments 40 | "lines-around-comment": 0, 41 | // specify the maximum depth that blocks can be nested 42 | "max-depth": [1, 3], 43 | // specify the maximum length of a line in your program 44 | "max-len": [1, 80], 45 | // specify the maximum depth callbacks can be nested 46 | "max-nested-callbacks": 0, 47 | // limits the number of parameters that can be used in the function declaration. 48 | "max-params": 0, 49 | // specify the maximum number of statement allowed in a function 50 | "max-statements": [1, 15], 51 | // require a capital letter for constructors 52 | "new-cap": 1, 53 | // disallow the omission of parentheses when invoking a constructor with no arguments 54 | "new-parens": 0, 55 | // allow/disallow an empty newline after var statement 56 | "newline-after-var": 0, 57 | // disallow use of the Array constructor 58 | "no-array-constructor": 0, 59 | // disallow use of bitwise operators 60 | "no-bitwise": 0, 61 | // disallow use of the continue statement 62 | "no-continue": 0, 63 | // disallow comments inline after code 64 | "no-inline-comments": 0, 65 | // disallow if as the only statement in an else block 66 | "no-lonely-if": 0, 67 | // disallow mixed spaces and tabs for indentation 68 | "no-mixed-spaces-and-tabs": 2, 69 | // disallow multiple empty lines 70 | "no-multiple-empty-lines": 0, 71 | // disallow negated conditions 72 | "no-negated-condition": 0, 73 | // disallow nested ternary expressions 74 | "no-nested-ternary": 0, 75 | // disallow use of the Object constructor 76 | "no-new-object": 0, 77 | // disallow use of unary operators, ++ and -- 78 | "no-plusplus": 0, 79 | // disallow use of certain syntax in code 80 | "no-restricted-syntax": 0, 81 | // disallow space between function identifier and application 82 | "no-spaced-func": 0, 83 | // disallow the use of ternary operators 84 | "no-ternary": 0, 85 | // disallow trailing whitespace at the end of lines 86 | "no-trailing-spaces": 2, 87 | // disallow dangling underscores in identifiers 88 | "no-underscore-dangle": 0, 89 | // disallow the use of Boolean literals in conditional expressions 90 | "no-unneeded-ternary": 0, 91 | // require or disallow padding inside curly braces 92 | "object-curly-spacing": [2, "always"], 93 | // allow just one var statement per function 94 | "one-var": 0, 95 | // require assignment operator shorthand where possible or prohibit it entirely 96 | "operator-assignment": 0, 97 | // enforce operators to be placed before or after line breaks 98 | "operator-linebreak": 0, 99 | // enforce padding within blocks 100 | "padded-blocks": 0, 101 | // require quotes around object literal property names 102 | "quote-props": 0, 103 | // specify whether double or single quotes should be used 104 | "quotes": [2, "single", "avoid-escape"], 105 | // Require JSDoc comment 106 | "require-jsdoc": 0, 107 | // enforce spacing before and after semicolons 108 | "semi-spacing": 0, 109 | // require or disallow use of semicolons instead of ASI 110 | "semi": [2, "always"], 111 | // sort variables within the same declaration block 112 | "sort-vars": 0, 113 | // require a space before/after certain keywords 114 | "keyword-spacing": [2, {"before": false, "after": true}], 115 | // require or disallow space before blocks 116 | "space-before-blocks": 0, 117 | // require or disallow space before function opening parenthesis 118 | "space-before-function-paren": 0, 119 | // require or disallow spaces inside parentheses 120 | "space-in-parens": 0, 121 | // require spaces around operators 122 | "space-infix-ops": 0, 123 | // Require or disallow spaces before/after unary operators 124 | "space-unary-ops": 2, 125 | // require or disallow a space immediately following the // or /* in a comment 126 | "spaced-comment": 0, 127 | // require regex literals to be wrapped in parentheses 128 | "wrap-regex": 0 129 | } 130 | }; 131 | -------------------------------------------------------------------------------- /rules/eslint/style/node-runtime.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce spacing inside array brackets 6 | "array-bracket-spacing": 0, 7 | // disallow or enforce spaces inside of single line blocks 8 | "block-spacing": 0, 9 | // enforce one true brace style 10 | "brace-style": 0, 11 | // require camel case names 12 | "camelcase": 0, 13 | // enforce spacing before and after comma 14 | "comma-spacing": 2, 15 | // enforce one true comma style 16 | "comma-style": 0, 17 | // require or disallow padding inside computed properties 18 | "computed-property-spacing": 0, 19 | // enforces consistent naming when capturing the current execution context 20 | "consistent-this": 0, 21 | // enforce newline at the end of file, with no multiple empty lines 22 | "eol-last": 2, 23 | // require function expressions to have a name 24 | "func-names": 0, 25 | // enforces use of function declarations or expressions 26 | "func-style": 0, 27 | // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) 28 | "id-length": 0, 29 | // require identifiers to match the provided regular expression 30 | "id-match": 0, 31 | // this option sets a specific tab width for your code 32 | "indent": [2, 2, {SwitchCase: 1}], 33 | // specify whether double or single quotes should be used in JSX attributes 34 | "jsx-quotes": 0, 35 | // enforces spacing between keys and values in object literal properties 36 | "key-spacing": 0, 37 | // disallow mixed "LF" and "CRLF" as linebreaks 38 | "linebreak-style": 0, 39 | // enforces empty lines around comments 40 | "lines-around-comment": 0, 41 | // specify the maximum depth that blocks can be nested 42 | "max-depth": 0, 43 | // specify the maximum length of a line in your program 44 | "max-len": [2, 80, 2], 45 | // specify the maximum depth callbacks can be nested 46 | "max-nested-callbacks": 0, 47 | // limits the number of parameters that can be used in the function declaration. 48 | "max-params": 0, 49 | // specify the maximum number of statement allowed in a function 50 | "max-statements": 0, 51 | // require a capital letter for constructors 52 | "new-cap": 0, 53 | // disallow the omission of parentheses when invoking a constructor with no arguments 54 | "new-parens": 2, 55 | // allow/disallow an empty newline after var statement 56 | "newline-after-var": 0, 57 | // disallow use of the Array constructor 58 | "no-array-constructor": 0, 59 | // disallow use of bitwise operators 60 | "no-bitwise": 0, 61 | // disallow use of the continue statement 62 | "no-continue": 0, 63 | // disallow comments inline after code 64 | "no-inline-comments": 0, 65 | // disallow if as the only statement in an else block 66 | "no-lonely-if": 0, 67 | // disallow mixed spaces and tabs for indentation 68 | "no-mixed-spaces-and-tabs": 2, 69 | // disallow multiple empty lines 70 | "no-multiple-empty-lines": [2, {max: 2}], 71 | // disallow negated conditions 72 | "no-negated-condition": 0, 73 | // disallow nested ternary expressions 74 | "no-nested-ternary": 0, 75 | // disallow use of the Object constructor 76 | "no-new-object": 0, 77 | // disallow use of unary operators, ++ and -- 78 | "no-plusplus": 0, 79 | // disallow use of certain syntax in code 80 | "no-restricted-syntax": 0, 81 | // disallow space between function identifier and application 82 | "no-spaced-func": 0, 83 | // disallow the use of ternary operators 84 | "no-ternary": 0, 85 | // disallow trailing whitespace at the end of lines 86 | "no-trailing-spaces": 2, 87 | // disallow dangling underscores in identifiers 88 | "no-underscore-dangle": 0, 89 | // disallow the use of Boolean literals in conditional expressions 90 | "no-unneeded-ternary": 0, 91 | // require or disallow padding inside curly braces 92 | "object-curly-spacing": 0, 93 | // allow just one var statement per function 94 | "one-var": 0, 95 | // require assignment operator shorthand where possible or prohibit it entirely 96 | "operator-assignment": 0, 97 | // enforce operators to be placed before or after line breaks 98 | "operator-linebreak": 0, 99 | // enforce padding within blocks 100 | "padded-blocks": 0, 101 | // require quotes around object literal property names 102 | "quote-props": 0, 103 | // specify whether double or single quotes should be used 104 | "quotes": [2, "single", "avoid-escape"], 105 | // Require JSDoc comment 106 | "require-jsdoc": 0, 107 | // enforce spacing before and after semicolons 108 | "semi-spacing": 0, 109 | // require or disallow use of semicolons instead of ASI 110 | "semi": 2, 111 | // sort variables within the same declaration block 112 | "sort-vars": 0, 113 | // require a space before/after certain keywords 114 | "keyword-spacing": [2, {"before": false, "after": true}], 115 | // require or disallow space before blocks 116 | "space-before-blocks": [2, "always"], 117 | // require or disallow space before function opening parenthesis 118 | "space-before-function-paren": [2, "never"], 119 | // require or disallow spaces inside parentheses 120 | "space-in-parens": [2, "never"], 121 | // require spaces around operators 122 | "space-infix-ops": 2, 123 | // Require or disallow spaces before/after unary operators 124 | "space-unary-ops": 2, 125 | // require or disallow a space immediately following the // or /* in a comment 126 | "spaced-comment": 0, 127 | // require regex literals to be wrapped in parentheses 128 | "wrap-regex": 0 129 | } 130 | }; 131 | -------------------------------------------------------------------------------- /rules/eslint/style/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce spacing inside array brackets 6 | "array-bracket-spacing": 0, 7 | // disallow or enforce spaces inside of single line blocks 8 | "block-spacing": 0, 9 | // enforce one true brace style 10 | "brace-style": 0, 11 | // require camel case names 12 | "camelcase": 0, 13 | // enforce spacing before and after comma 14 | "comma-spacing": 0, 15 | // enforce one true comma style 16 | "comma-style": 0, 17 | // require or disallow padding inside computed properties 18 | "computed-property-spacing": 0, 19 | // enforces consistent naming when capturing the current execution context 20 | "consistent-this": 0, 21 | // enforce newline at the end of file, with no multiple empty lines 22 | "eol-last": 0, 23 | // require function expressions to have a name 24 | "func-names": 0, 25 | // enforces use of function declarations or expressions 26 | "func-style": 0, 27 | // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) 28 | "id-length": 0, 29 | // require identifiers to match the provided regular expression 30 | "id-match": 0, 31 | // this option sets a specific tab width for your code 32 | "indent": 0, 33 | // specify whether double or single quotes should be used in JSX attributes 34 | "jsx-quotes": 0, 35 | // enforces spacing between keys and values in object literal properties 36 | "key-spacing": 0, 37 | // disallow mixed "LF" and "CRLF" as linebreaks 38 | "linebreak-style": 0, 39 | // enforces empty lines around comments 40 | "lines-around-comment": 0, 41 | // specify the maximum depth that blocks can be nested 42 | "max-depth": 0, 43 | // specify the maximum length of a line in your program 44 | "max-len": 0, 45 | // specify the maximum depth callbacks can be nested 46 | "max-nested-callbacks": 0, 47 | // limits the number of parameters that can be used in the function declaration. 48 | "max-params": 0, 49 | // specify the maximum number of statement allowed in a function 50 | "max-statements": 0, 51 | // require a capital letter for constructors 52 | "new-cap": 0, 53 | // disallow the omission of parentheses when invoking a constructor with no arguments 54 | "new-parens": 0, 55 | // allow/disallow an empty newline after var statement 56 | "newline-after-var": 0, 57 | // disallow use of the Array constructor 58 | "no-array-constructor": 0, 59 | // disallow use of bitwise operators 60 | "no-bitwise": 0, 61 | // disallow use of the continue statement 62 | "no-continue": 0, 63 | // disallow comments inline after code 64 | "no-inline-comments": 0, 65 | // disallow if as the only statement in an else block 66 | "no-lonely-if": 0, 67 | // disallow mixed spaces and tabs for indentation 68 | "no-mixed-spaces-and-tabs": 0, 69 | // disallow multiple empty lines 70 | "no-multiple-empty-lines": 0, 71 | // disallow negated conditions 72 | "no-negated-condition": 0, 73 | // disallow nested ternary expressions 74 | "no-nested-ternary": 0, 75 | // disallow use of the Object constructor 76 | "no-new-object": 0, 77 | // disallow use of unary operators, ++ and -- 78 | "no-plusplus": 0, 79 | // disallow use of certain syntax in code 80 | "no-restricted-syntax": 0, 81 | // disallow space between function identifier and application 82 | "no-spaced-func": 0, 83 | // disallow the use of ternary operators 84 | "no-ternary": 0, 85 | // disallow trailing whitespace at the end of lines 86 | "no-trailing-spaces": 0, 87 | // disallow dangling underscores in identifiers 88 | "no-underscore-dangle": 0, 89 | // disallow the use of Boolean literals in conditional expressions 90 | "no-unneeded-ternary": 0, 91 | // require or disallow padding inside curly braces 92 | "object-curly-spacing": 0, 93 | // allow just one var statement per function 94 | "one-var": 0, 95 | // require assignment operator shorthand where possible or prohibit it entirely 96 | "operator-assignment": 0, 97 | // enforce operators to be placed before or after line breaks 98 | "operator-linebreak": 0, 99 | // enforce padding within blocks 100 | "padded-blocks": 0, 101 | // require quotes around object literal property names 102 | "quote-props": 0, 103 | // specify whether double or single quotes should be used 104 | "quotes": 0, 105 | // Require JSDoc comment 106 | "require-jsdoc": 0, 107 | // enforce spacing before and after semicolons 108 | "semi-spacing": 0, 109 | // require or disallow use of semicolons instead of ASI 110 | "semi": 0, 111 | // sort variables within the same declaration block 112 | "sort-vars": 0, 113 | // require a space before/after certain keywords 114 | "keyword-spacing": 0, 115 | // require or disallow space before blocks 116 | "space-before-blocks": 0, 117 | // require or disallow space before function opening parenthesis 118 | "space-before-function-paren": 0, 119 | // require or disallow spaces inside parentheses 120 | "space-in-parens": 0, 121 | // require spaces around operators 122 | "space-infix-ops": 0, 123 | // Require or disallow spaces before/after unary operators 124 | "space-unary-ops": 0, 125 | // require or disallow a space immediately following the // or /* in a comment 126 | "spaced-comment": 0, 127 | // require regex literals to be wrapped in parentheses 128 | "wrap-regex": 0 129 | } 130 | }; 131 | -------------------------------------------------------------------------------- /rules/eslint/style/walmart.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce spacing inside array brackets 6 | "array-bracket-spacing": 0, 7 | // disallow or enforce spaces inside of single line blocks 8 | "block-spacing": 0, 9 | // enforce one true brace style 10 | "brace-style": [2, "1tbs", { "allowSingleLine": true }], 11 | // require camel case names 12 | "camelcase": 2, 13 | // enforce spacing before and after comma 14 | "comma-spacing": 2, 15 | // enforce one true comma style 16 | "comma-style": [2, "last"], 17 | // require or disallow padding inside computed properties 18 | "computed-property-spacing": [0, "never"], 19 | // enforces consistent naming when capturing the current execution context 20 | "consistent-this": [2, "self"], 21 | // enforce newline at the end of file, with no multiple empty lines 22 | "eol-last": 2, 23 | // require function expressions to have a name 24 | "func-names": 0, 25 | // enforces use of function declarations or expressions 26 | "func-style": [2, "expression"], 27 | // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) 28 | "id-length": 0, 29 | // require identifiers to match the provided regular expression 30 | "id-match": 0, 31 | // this option sets a specific tab width for your code 32 | "indent": [2, 2], 33 | // specify whether double or single quotes should be used in JSX attributes 34 | "jsx-quotes": [2, "prefer-double"], 35 | // enforces spacing between keys and values in object literal properties 36 | "key-spacing": [2, { "beforeColon": false, "afterColon": true }], 37 | // disallow mixed "LF" and "CRLF" as linebreaks 38 | "linebreak-style": [0, "unix"], 39 | // enforces empty lines around comments 40 | "lines-around-comment": 0, 41 | // specify the maximum depth that blocks can be nested 42 | "max-depth": [2, 4], 43 | // specify the maximum length of a line in your program 44 | "max-len": [2, 100, 2, {"ignoreUrls": true, "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\("}], 45 | // specify the maximum depth callbacks can be nested 46 | "max-nested-callbacks": [2, 3], 47 | // limits the number of parameters that can be used in the function declaration. 48 | "max-params": [2, 3], 49 | // specify the maximum number of statement allowed in a function 50 | "max-statements": [2, 15], 51 | // require a capital letter for constructors 52 | "new-cap": 2, 53 | // disallow the omission of parentheses when invoking a constructor with no arguments 54 | "new-parens": 2, 55 | // allow/disallow an empty newline after var statement 56 | "newline-after-var": 0, 57 | // disallow use of the Array constructor 58 | "no-array-constructor": 2, 59 | // disallow use of bitwise operators 60 | "no-bitwise": 2, 61 | // disallow use of the continue statement 62 | "no-continue": 0, 63 | // disallow comments inline after code 64 | "no-inline-comments": 0, 65 | // disallow if as the only statement in an else block 66 | "no-lonely-if": 2, 67 | // disallow mixed spaces and tabs for indentation 68 | "no-mixed-spaces-and-tabs": 2, 69 | // disallow multiple empty lines 70 | "no-multiple-empty-lines": [2, {"max": 2}], 71 | // disallow negated conditions 72 | "no-negated-condition": 0, 73 | // disallow nested ternary expressions 74 | "no-nested-ternary": 2, 75 | // disallow use of the Object constructor 76 | "no-new-object": 2, 77 | // disallow use of unary operators, ++ and -- 78 | "no-plusplus": 0, 79 | // disallow use of certain syntax in code 80 | "no-restricted-syntax": 0, 81 | // disallow space between function identifier and application 82 | "no-spaced-func": 2, 83 | // disallow the use of ternary operators 84 | "no-ternary": 0, 85 | // disallow trailing whitespace at the end of lines 86 | "no-trailing-spaces": 2, 87 | // disallow dangling underscores in identifiers 88 | "no-underscore-dangle": 0, 89 | // disallow the use of Boolean literals in conditional expressions 90 | "no-unneeded-ternary": 0, 91 | // require or disallow padding inside curly braces 92 | "object-curly-spacing": [0, "never"], 93 | // allow just one var statement per function 94 | "one-var": [2, "never"], 95 | // require assignment operator shorthand where possible or prohibit it entirely 96 | "operator-assignment": [2, "always"], 97 | // enforce operators to be placed before or after line breaks 98 | "operator-linebreak": 0, 99 | // enforce padding within blocks 100 | "padded-blocks": 0, 101 | // require quotes around object literal property names 102 | "quote-props": 0, 103 | // specify whether double or single quotes should be used 104 | "quotes": [2, "double"], 105 | // Require JSDoc comment 106 | "require-jsdoc": 0, 107 | // enforce spacing before and after semicolons 108 | "semi-spacing": [2, {"before": false, "after": true}], 109 | // require or disallow use of semicolons instead of ASI 110 | "semi": 2, 111 | // sort variables within the same declaration block 112 | "sort-vars": 0, 113 | // require a space before/after certain keywords 114 | "keyword-spacing": [2, {"before": true, "after": true}], 115 | // require or disallow space before blocks 116 | "space-before-blocks": [2, "always"], 117 | // require or disallow space before function opening parenthesis 118 | "space-before-function-paren": [2, {"anonymous": "always", "named": "never" }], 119 | // require or disallow spaces inside parentheses 120 | "space-in-parens": [2, "never"], 121 | // require spaces around operators 122 | "space-infix-ops": 2, 123 | // Require or disallow spaces before/after unary operators 124 | "space-unary-ops": [2, { "words": true, "nonwords": false }], 125 | // require or disallow a space immediately following the // or /* in a comment 126 | "spaced-comment": 0, 127 | // require regex literals to be wrapped in parentheses 128 | "wrap-regex": 0 129 | } 130 | }; 131 | -------------------------------------------------------------------------------- /rules/eslint/variables/airbnb.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce or disallow variable initializations at definition 6 | "init-declarations": 0, 7 | // disallow the catch clause parameter name being the same as a variable in the outer scope 8 | "no-catch-shadow": 0, 9 | // disallow deletion of variables 10 | "no-delete-var": 2, 11 | // disallow labels that share a name with a variable 12 | "no-label-var": 0, 13 | // disallow shadowing of names such as arguments 14 | "no-shadow-restricted-names": 2, 15 | // disallow declaration of variables already declared in the outer scope 16 | "no-shadow": 2, 17 | // disallow use of undefined when initializing variables 18 | "no-undef-init": 0, 19 | // disallow use of undeclared variables unless mentioned in a /*global */ block 20 | "no-undef": 2, 21 | // disallow use of undefined variable 22 | "no-undefined": 0, 23 | // disallow declaration of variables that are not used in the code 24 | "no-unused-vars": [2, {"vars": "local", "args": "after-used"}], 25 | // disallow use of variables before they are defined 26 | "no-use-before-define": 2 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /rules/eslint/variables/eslint.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce or disallow variable initializations at definition 6 | "init-declarations": 0, 7 | // disallow the catch clause parameter name being the same as a variable in the outer scope 8 | "no-catch-shadow": 0, 9 | // disallow deletion of variables 10 | "no-delete-var": 2, 11 | // disallow labels that share a name with a variable 12 | "no-label-var": 0, 13 | // disallow shadowing of names such as arguments 14 | "no-shadow-restricted-names": 0, 15 | // disallow declaration of variables already declared in the outer scope 16 | "no-shadow": 0, 17 | // disallow use of undefined when initializing variables 18 | "no-undef-init": 0, 19 | // disallow use of undeclared variables unless mentioned in a /*global */ block 20 | "no-undef": 2, 21 | // disallow use of undefined variable 22 | "no-undefined": 0, 23 | // disallow declaration of variables that are not used in the code 24 | "no-unused-vars": [2, {"vars": "all", "args": "after-used"}], 25 | // disallow use of variables before they are defined 26 | "no-use-before-define": 0 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /rules/eslint/variables/google.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce or disallow variable initializations at definition 6 | "init-declarations": 0, 7 | // disallow the catch clause parameter name being the same as a variable in the outer scope 8 | "no-catch-shadow": 0, 9 | // disallow deletion of variables 10 | "no-delete-var": 0, 11 | // disallow labels that share a name with a variable 12 | "no-label-var": 0, 13 | // disallow shadowing of names such as arguments 14 | "no-shadow-restricted-names": 0, 15 | // disallow declaration of variables already declared in the outer scope 16 | "no-shadow": 0, 17 | // disallow use of undefined when initializing variables 18 | "no-undef-init": 0, 19 | // disallow use of undeclared variables unless mentioned in a /*global */ block 20 | "no-undef": 2, 21 | // disallow use of undefined variable 22 | "no-undefined": 0, 23 | // disallow declaration of variables that are not used in the code 24 | "no-unused-vars": 0, 25 | // disallow use of variables before they are defined 26 | "no-use-before-define": 0 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /rules/eslint/variables/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce or disallow variable initializations at definition 6 | "init-declarations": 0, 7 | // disallow the catch clause parameter name being the same as a variable in the outer scope 8 | "no-catch-shadow": 0, 9 | // disallow deletion of variables 10 | "no-delete-var": 0, 11 | // disallow labels that share a name with a variable 12 | "no-label-var": 0, 13 | // disallow shadowing of names such as arguments 14 | "no-shadow-restricted-names": 0, 15 | // disallow declaration of variables already declared in the outer scope 16 | "no-shadow": 0, 17 | // disallow use of undefined when initializing variables 18 | "no-undef-init": 0, 19 | // disallow use of undeclared variables unless mentioned in a /*global */ block 20 | "no-undef": 0, 21 | // disallow use of undefined variable 22 | "no-undefined": 0, 23 | // disallow declaration of variables that are not used in the code 24 | "no-unused-vars": 1, 25 | // disallow use of variables before they are defined 26 | "no-use-before-define": [2, "nofunc"] 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /rules/eslint/variables/node-runtime.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce or disallow variable initializations at definition 6 | "init-declarations": 0, 7 | // disallow the catch clause parameter name being the same as a variable in the outer scope 8 | "no-catch-shadow": 0, 9 | // disallow deletion of variables 10 | "no-delete-var": 0, 11 | // disallow labels that share a name with a variable 12 | "no-label-var": 0, 13 | // disallow shadowing of names such as arguments 14 | "no-shadow-restricted-names": 0, 15 | // disallow declaration of variables already declared in the outer scope 16 | "no-shadow": 0, 17 | // disallow use of undefined when initializing variables 18 | "no-undef-init": 0, 19 | // disallow use of undeclared variables unless mentioned in a /*global */ block 20 | "no-undef": 2, 21 | // disallow use of undefined variable 22 | "no-undefined": 0, 23 | // disallow declaration of variables that are not used in the code 24 | "no-unused-vars": [2, {"args": "none"}], 25 | // disallow use of variables before they are defined 26 | "no-use-before-define": 0 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /rules/eslint/variables/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce or disallow variable initializations at definition 6 | "init-declarations": 0, 7 | // disallow the catch clause parameter name being the same as a variable in the outer scope 8 | "no-catch-shadow": 0, 9 | // disallow deletion of variables 10 | "no-delete-var": 0, 11 | // disallow labels that share a name with a variable 12 | "no-label-var": 0, 13 | // disallow shadowing of names such as arguments 14 | "no-shadow-restricted-names": 0, 15 | // disallow declaration of variables already declared in the outer scope 16 | "no-shadow": 0, 17 | // disallow use of undefined when initializing variables 18 | "no-undef-init": 0, 19 | // disallow use of undeclared variables unless mentioned in a /*global */ block 20 | "no-undef": 0, 21 | // disallow use of undefined variable 22 | "no-undefined": 0, 23 | // disallow declaration of variables that are not used in the code 24 | "no-unused-vars": 0, 25 | // disallow use of variables before they are defined 26 | "no-use-before-define": 0 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /rules/eslint/variables/walmart.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "rules": { 5 | // enforce or disallow variable initializations at definition 6 | "init-declarations": 0, 7 | // disallow the catch clause parameter name being the same as a variable in the outer scope 8 | "no-catch-shadow": 2, 9 | // disallow deletion of variables 10 | "no-delete-var": 2, 11 | // disallow labels that share a name with a variable 12 | "no-label-var": 2, 13 | // disallow shadowing of names such as arguments 14 | "no-shadow-restricted-names": 2, 15 | // disallow declaration of variables already declared in the outer scope 16 | "no-shadow": 2, 17 | // disallow use of undefined when initializing variables 18 | "no-undef-init": 2, 19 | // disallow use of undeclared variables unless mentioned in a /*global */ block 20 | "no-undef": 2, 21 | // disallow use of undefined variable 22 | "no-undefined": 0, 23 | // disallow declaration of variables that are not used in the code 24 | "no-unused-vars": [2, {"vars": "all", "args": "after-used"}], 25 | // disallow use of variables before they are defined 26 | "no-use-before-define": 2 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /rules/filenames/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "plugins": [ 5 | "filenames" 6 | ], 7 | "rules": { 8 | // Enforce filenames 9 | "filenames/match-regex": 0 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /rules/filenames/walmart.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "plugins": [ 5 | "filenames" 6 | ], 7 | "rules": { 8 | // Enforce dash-cased filenames 9 | "filenames/match-regex": [2, "^[a-z0-9\\-\\.]+$"] 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /rules/react/airbnb.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "parser": "babel-eslint", 5 | "plugins": [ 6 | "react" 7 | ], 8 | "ecmaFeatures": { 9 | "jsx": false 10 | }, 11 | "rules": { 12 | // Prevent missing displayName in a React component definition 13 | "react/display-name": [0, { "acceptTranspilerName": false }], 14 | // Forbid certain propTypes 15 | "react/forbid-prop-types": [0, { "forbid": ["any", "array", "object"] }], 16 | // Enforce boolean attributes notation in JSX 17 | "react/jsx-boolean-value": [2, "never"], 18 | // Validate closing bracket location in JSX 19 | "react/jsx-closing-bracket-location": [2, "line-aligned"], 20 | // Enforce or disallow spaces inside of curly braces in JSX attributes 21 | "react/jsx-curly-spacing": [0, "never", { "allowMultiline": true }], 22 | // Enforce event handler naming conventions in JSX 23 | "react/jsx-handler-names": [0, { 24 | "eventHandlerPrefix": "handle", 25 | "eventHandlerPropPrefix": "on" 26 | }], 27 | // Validate props indentation in JSX 28 | "react/jsx-indent-props": [2, 2], 29 | // Validate JSX has key prop when in array or iterator 30 | "react/jsx-key": 0, 31 | // Limit maximum of props on a single line in JSX 32 | "react/jsx-max-props-per-line": [0, { "maximum": 1 }], 33 | // Prevent usage of .bind() and arrow functions in JSX props 34 | "react/jsx-no-bind": 2, 35 | // Prevent duplicate props in JSX 36 | "react/jsx-no-duplicate-props": [0, { "ignoreCase": false }], 37 | // Prevent usage of isMounted 38 | "react/no-is-mounted": 2, 39 | // Prevent usage of unwrapped JSX strings 40 | "react/jsx-no-literals": 0, 41 | // Disallow undeclared variables in JSX 42 | "react/jsx-no-undef": 2, 43 | // Enforce PascalCase for user-defined JSX components 44 | "react/jsx-pascal-case": 0, 45 | // Enforce quote style for JSX attributes 46 | "react/jsx-quotes": 0, 47 | // Enforce propTypes declarations alphabetical sorting 48 | "react/jsx-sort-prop-types": [0, { 49 | "ignoreCase": false, 50 | "callbacksLast": false 51 | }], 52 | // Enforce props alphabetical sorting 53 | "react/jsx-sort-props": [0, { 54 | "ignoreCase": false, 55 | "callbacksLast": false 56 | }], 57 | // Prevent React to be incorrectly marked as unused 58 | "react/jsx-uses-react": [2, { "pragma": "React" }], 59 | // Prevent variables used in JSX to be incorrectly marked as unused 60 | "react/jsx-uses-vars": 2, 61 | // Prevent usage of dangerous JSX properties 62 | "react/no-danger": 0, 63 | // Prevent usage of deprecated methods 64 | "react/no-deprecated": [1, { "react": "0.14.0" }], 65 | // Prevent usage of setState in componentDidMount 66 | "react/no-did-mount-set-state": [2, "allow-in-func"], 67 | // Prevent usage of setState in componentDidUpdate 68 | "react/no-did-update-set-state": [2, "allow-in-func"], 69 | // Prevent direct mutation of this.state 70 | "react/no-direct-mutation-state": 0, 71 | // Prevent multiple component definition per file 72 | "react/no-multi-comp": [2, { "ignoreStateless": true }], 73 | // Prevent usage of setState 74 | "react/no-set-state": 0, 75 | // Prevent using string references in ref attribute. 76 | "react/no-string-refs": 0, 77 | // Prevent usage of unknown DOM property 78 | "react/no-unknown-property": 0, 79 | // Enforce ES5 or ES6 class for React Components 80 | "react/prefer-es6-class": [2, "always"], 81 | // Prevent missing props validation in a React component definition 82 | "react/prop-types": [2, { "ignore": [], "customValidators": [] }], 83 | // Prevent missing React when using JSX 84 | "react/react-in-jsx-scope": 2, 85 | // Restrict file extensions that may be required 86 | "react/require-extension": [0, { "extensions": [".jsx"] }], 87 | // Prevent extra closing tags for components without children 88 | "react/self-closing-comp": 2, 89 | // Enforce component methods order 90 | "react/sort-comp": [2, { 91 | "order": [ 92 | "lifecycle", 93 | "/^on.+$/", 94 | "/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/", 95 | "everything-else", 96 | "/^render.+$/", 97 | "render" 98 | ] 99 | }], 100 | // Prevent missing parentheses around multilines JSX 101 | "react/wrap-multilines": [2, { 102 | declaration: true, 103 | assignment: true, 104 | return: true 105 | }] 106 | } 107 | }; 108 | -------------------------------------------------------------------------------- /rules/react/off.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "plugins": [ 5 | "react" 6 | ], 7 | "ecmaFeatures": { 8 | "jsx": false 9 | }, 10 | "rules": { 11 | // Prevent missing displayName in a React component definition 12 | "react/display-name": 0, 13 | // Forbid certain propTypes 14 | "react/forbid-prop-types": 0, 15 | // Enforce boolean attributes notation in JSX 16 | "react/jsx-boolean-value": 0, 17 | // Validate closing bracket location in JSX 18 | "react/jsx-closing-bracket-location": 0, 19 | // Enforce or disallow spaces inside of curly braces in JSX attributes 20 | "react/jsx-curly-spacing": 0, 21 | // Enforce event handler naming conventions in JSX 22 | "react/jsx-handler-names": 0, 23 | // Validate props indentation in JSX 24 | "react/jsx-indent-props": 0, 25 | // Validate JSX has key prop when in array or iterator 26 | "react/jsx-key": 0, 27 | // Limit maximum of props on a single line in JSX 28 | "react/jsx-max-props-per-line": 0, 29 | // Prevent usage of .bind() and arrow functions in JSX props 30 | "react/jsx-no-bind": 0, 31 | // Prevent duplicate props in JSX 32 | "react/jsx-no-duplicate-props": 0, 33 | // Prevent usage of isMounted 34 | "react/no-is-mounted": 0, 35 | // Prevent usage of unwrapped JSX strings 36 | "react/jsx-no-literals": 0, 37 | // Disallow undeclared variables in JSX 38 | "react/jsx-no-undef": 0, 39 | // Enforce PascalCase for user-defined JSX components 40 | "react/jsx-pascal-case": 0, 41 | // Enforce quote style for JSX attributes 42 | "react/jsx-quotes": 0, 43 | // Enforce propTypes declarations alphabetical sorting 44 | "react/jsx-sort-prop-types": 0, 45 | // Enforce props alphabetical sorting 46 | "react/jsx-sort-props": 0, 47 | // Prevent React to be incorrectly marked as unused 48 | "react/jsx-uses-react": 0, 49 | // Prevent variables used in JSX to be incorrectly marked as unused 50 | "react/jsx-uses-vars": 0, 51 | // Prevent usage of dangerous JSX properties 52 | "react/no-danger": 0, 53 | // Prevent usage of deprecated methods 54 | "react/no-deprecated": 0, 55 | // Prevent usage of setState in componentDidMount 56 | "react/no-did-mount-set-state": 0, 57 | // Prevent usage of setState in componentDidUpdate 58 | "react/no-did-update-set-state": 0, 59 | // Prevent direct mutation of this.state 60 | "react/no-direct-mutation-state": 0, 61 | // Prevent multiple component definition per file 62 | "react/no-multi-comp": 0, 63 | // Prevent usage of setState 64 | "react/no-set-state": 0, 65 | // Prevent using string references in ref attribute. 66 | "react/no-string-refs": 0, 67 | // Prevent usage of unknown DOM property 68 | "react/no-unknown-property": 0, 69 | // Enforce ES5 or ES6 class for React Components 70 | "react/prefer-es6-class": 0, 71 | // Prevent missing props validation in a React component definition 72 | "react/prop-types": 0, 73 | // Prevent missing React when using JSX 74 | "react/react-in-jsx-scope": 0, 75 | // Restrict file extensions that may be required 76 | "react/require-extension": 0, 77 | // Prevent extra closing tags for components without children 78 | "react/self-closing-comp": 0, 79 | // Enforce component methods order 80 | "react/sort-comp": 0, 81 | // Prevent missing parentheses around multilines JSX 82 | "react/wrap-multilines": 0 83 | } 84 | }; 85 | -------------------------------------------------------------------------------- /rules/react/walmart.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | "parser": "babel-eslint", 5 | "plugins": [ 6 | "react" 7 | ], 8 | "ecmaFeatures": { 9 | "jsx": false 10 | }, 11 | "rules": { 12 | // Prevent missing displayName in a React component definition 13 | "react/display-name": 0, 14 | // Forbid certain propTypes 15 | "react/forbid-prop-types": 0, 16 | // Enforce boolean attributes notation in JSX 17 | "react/jsx-boolean-value": 2, 18 | // Validate closing bracket location in JSX 19 | "react/jsx-closing-bracket-location": [2, "tag-aligned"], 20 | // Enforce or disallow spaces inside of curly braces in JSX attributes 21 | "react/jsx-curly-spacing": 0, 22 | // Enforce event handler naming conventions in JSX 23 | "react/jsx-handler-names": 1, 24 | // Validate props indentation in JSX 25 | "react/jsx-indent-props": [2, 2], 26 | // Validate JSX has key prop when in array or iterator 27 | "react/jsx-key": 2, 28 | // Limit maximum of props on a single line in JSX 29 | "react/jsx-max-props-per-line": 0, 30 | // Prevent usage of .bind() and arrow functions in JSX props 31 | "react/jsx-no-bind": 0, 32 | // Prevent duplicate props in JSX 33 | "react/jsx-no-duplicate-props": 0, 34 | // Prevent usage of isMounted 35 | "react/no-is-mounted": 2, 36 | // Prevent usage of unwrapped JSX strings 37 | "react/jsx-no-literals": 0, 38 | // Disallow undeclared variables in JSX 39 | "react/jsx-no-undef": 2, 40 | // Enforce PascalCase for user-defined JSX components 41 | "react/jsx-pascal-case": 2, 42 | // Enforce quote style for JSX attributes 43 | "react/jsx-quotes": 0, 44 | // Enforce propTypes declarations alphabetical sorting 45 | "react/jsx-sort-prop-types": 0, 46 | // Enforce props alphabetical sorting 47 | "react/jsx-sort-props": 0, 48 | // Prevent React to be incorrectly marked as unused 49 | "react/jsx-uses-react": 2, 50 | // Prevent variables used in JSX to be incorrectly marked as unused 51 | "react/jsx-uses-vars": 2, 52 | // Prevent usage of dangerous JSX properties 53 | "react/no-danger": 0, 54 | // Prevent usage of deprecated methods 55 | "react/no-deprecated": 2, 56 | // Prevent usage of setState in componentDidMount 57 | "react/no-did-mount-set-state": 2, 58 | // Prevent usage of setState in componentDidUpdate 59 | "react/no-did-update-set-state": 2, 60 | // Prevent direct mutation of this.state 61 | "react/no-direct-mutation-state": 2, 62 | // Prevent multiple component definition per file 63 | "react/no-multi-comp": 0, 64 | // Prevent usage of setState 65 | "react/no-set-state": 0, 66 | // Prevent using string references in ref attribute. 67 | "react/no-string-refs": 0, 68 | // Prevent usage of unknown DOM property 69 | "react/no-unknown-property": 2, 70 | // Enforce ES5 or ES6 class for React Components 71 | "react/prefer-es6-class": 2, 72 | // Prevent missing props validation in a React component definition 73 | "react/prop-types": 2, 74 | // Prevent missing React when using JSX 75 | "react/react-in-jsx-scope": 2, 76 | // Restrict file extensions that may be required 77 | "react/require-extension": 0, 78 | // Prevent extra closing tags for components without children 79 | "react/self-closing-comp": 2, 80 | // Enforce component methods order 81 | "react/sort-comp": 0, 82 | // Prevent missing parentheses around multilines JSX 83 | "react/wrap-multilines": 2 84 | } 85 | }; 86 | --------------------------------------------------------------------------------