-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For modern browsers. Signed-off-by: Kevin Locke <[email protected]>
- Loading branch information
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// ESLint configuration for JS run directly in (modern) browsers. | ||
// <https://eslint.org/docs/user-guide/configuring> | ||
|
||
"use strict"; | ||
|
||
module.exports = { | ||
// Based on Airbnb with changes to match Node core and my prefs. | ||
"extends": [ | ||
"airbnb-base", | ||
|
||
// ESLint built-in rules | ||
"./rules/es6", | ||
"./rules/best-practices", | ||
"./rules/possible-errors", | ||
"./rules/style", | ||
"./rules/variables", | ||
|
||
// Plugin rules | ||
"./rules/jsdoc", | ||
"./rules/promise", | ||
"./rules/regexp", | ||
"./rules/unicorn" | ||
], | ||
|
||
"parserOptions": { | ||
"sourceType": "script", | ||
// airbnb-base disables generators due to regenerator-runtime overhead. | ||
// Modern browsers support generators without regenerator, so allow. | ||
"ecmaFeatures": { | ||
"generators": true | ||
} | ||
}, | ||
|
||
"env": { | ||
"browser": true, | ||
// Disable node env added by airbnb-base/legacy | ||
"node": false | ||
}, | ||
|
||
"rules": { | ||
// allow console (which is always supported and conventional for logging) | ||
"no-console": "off", | ||
|
||
// require 'use strict' in global scope | ||
"strict": ["error", "global"], | ||
|
||
// don't prefer modules | ||
"unicorn/prefer-module": "off" | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters