This repository has been archived by the owner on Apr 25, 2022. It is now read-only.
-
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.
All dependencies have been updated, some linting rules have been changed: - quotes have been changed from single to double. - no-loss-of-precision added. - no-unreachable-loop added. - no-promise-executor-return added.
- Loading branch information
1 parent
3dd9ed2
commit af26112
Showing
16 changed files
with
767 additions
and
651 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,37 @@ | ||
const style = require('./rules/base/style').rules; | ||
const bestPractices = require('./rules/base/best-practices').rules; | ||
const style = require("./rules/base/style").rules; | ||
const bestPractices = require("./rules/base/best-practices").rules; | ||
|
||
module.exports = { | ||
parser: 'babel-eslint', | ||
parser: "babel-eslint", | ||
|
||
extends: [require.resolve('./base')], | ||
extends: [require.resolve("./base")], | ||
|
||
plugins: ['babel'], | ||
plugins: ["@babel"], | ||
|
||
rules: { | ||
|
||
// Require a capital letter for constructors | ||
// Babel: Ignores capitalized decorators (@Decorator) | ||
'new-cap': 'off', | ||
'babel/new-cap': style['new-cap'], | ||
|
||
// Require camel case names | ||
// Babel: doesn't complain about optional chaining (var foo = bar?.a_b;`) | ||
camelcase: 'off', | ||
'babel/camelcase': style.camelcase, | ||
"new-cap": "off", | ||
"@babel/new-cap": style["new-cap"], | ||
|
||
// Require padding inside curly braces | ||
// Babel: doesn't complain about export x from "mod"; or export * as x from "mod"; | ||
'object-curly-spacing': 'off', | ||
'babel/object-curly-spacing': style['object-curly-spacing'], | ||
|
||
|
||
// Specify whether double or single quotes should be used | ||
// Babel: doesn't complain about JSX fragment shorthand syntax (<>foo</>;) | ||
quotes: 'off', | ||
'babel/quotes': style.quotes, | ||
"object-curly-spacing": "off", | ||
"@babel/object-curly-spacing": style["object-curly-spacing"], | ||
|
||
// Require or disallow use of semicolons instead of ASI | ||
// Babel: doesn't fail when using for await (let something of {}). Includes class properties | ||
semi: 'off', | ||
'babel/semi': style.semi, | ||
semi: "off", | ||
"@babel/semi": style.semi, | ||
|
||
// Disallow this keywords outside of classes or class-like objects | ||
// Babel: doesn't fail when inside class properties (class A { a = this.b; }) | ||
'no-invalid-this': 'off', | ||
'babel/no-invalid-this': bestPractices['no-invalid-this'], | ||
"no-invalid-this": "off", | ||
"@babel/no-invalid-this": bestPractices["no-invalid-this"], | ||
|
||
// Disallow usage of expressions in statement position | ||
// Babel: doesn't fail when using do expressions or optional chaining (a?.b()). | ||
'no-unused-expressions': 'off', | ||
'babel/no-unused-expressions': bestPractices['no-unused-expressions'], | ||
"no-unused-expressions": "off", | ||
"@babel/no-unused-expressions": bestPractices["no-unused-expressions"], | ||
}, | ||
}; |
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
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
Oops, something went wrong.