Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Explicitly specify plugins in each file if used #35

Merged
merged 1 commit into from
Apr 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions coding-styles/fixable.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
// then rather abandons the effort instead of fixing them.
module.exports = {

plugins: [
'import',
],

rules: {
// enforce line breaks after opening and before closing array brackets
// Requires consistent usage of linebreaks for each pair of brackets. It reports an error if one
Expand Down
4 changes: 4 additions & 0 deletions coding-styles/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
// These rules represent coding style targeted for React components.
module.exports = {

plugins: [
'react',
],

rules: {
// Validate closing bracket location in JSX
// This rule checks all JSX multiline elements and verifies the location of the closing bracket.
Expand Down
4 changes: 4 additions & 0 deletions coding-styles/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ module.exports = {

extends: './fixable.js',

plugins: [
'import',
],

rules: {
// Require Camelcase
// This rule looks for any underscores (_) located within the source code. It ignores leading
Expand Down
4 changes: 4 additions & 0 deletions environments/react/optional.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ module.exports = {

extends: '../shared/optional.js',

plugins: [
'react',
],

rules: {
// Disallow Use of Alert
// This rule is aimed at catching debugging code that should be removed and popup UI elements
Expand Down
4 changes: 4 additions & 0 deletions environments/react/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ module.exports = {
},
},

plugins: [
'react',
],

rules: {
// Enforce JSX Quote Style
// This rule enforces the consistent use of either double or single quotes in JSX attributes.
Expand Down
4 changes: 4 additions & 0 deletions environments/react/v16.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ module.exports = {
'./v15.js',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.v15.js should also include the react plugin...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh I see! 👍

],

plugins: [
'react',
],

// Configures the react plugin to treat some rules with regard to this specific React.js version
settings: {
react: {
Expand Down
4 changes: 4 additions & 0 deletions environments/shared/optional.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const globs = require('../../globs')

module.exports = {

plugins: [
'import',
],

rules: {
// Require Consistent Returns
// This rule is aimed at ensuring all return statements either specify a value or don't specify
Expand Down