forked from mldangelo/personal-site
-
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.
Update eslint to work across windows, maxOS, and ubuntu (mldangelo#446)
* convert to javascript * sort keys * add custom linebreak style rule * matrix operating system * dont matrix node version for lint * attempt to make lint work on 'nix and windows * use ubuntu latest * add newline * matrix build step * run fewer build steps * remove custom linebreak style * revert rule change * move ignore into eslintrc.js file
- Loading branch information
Showing
5 changed files
with
61 additions
and
42 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
const os = require('os'); | ||
|
||
module.exports = { | ||
env: { | ||
browser: true, | ||
jest: true, | ||
node: true, | ||
}, | ||
extends: 'airbnb', | ||
ignorePatterns: [ | ||
'node_modules/', | ||
'build/', | ||
], | ||
parser: '@babel/eslint-parser', | ||
plugins: ['react'], | ||
rules: { | ||
'jsx-a11y/anchor-is-valid': ['error', { | ||
aspects: ['noHref', 'invalidHref', 'preferButton'], | ||
components: ['Link'], | ||
specialLink: ['to', 'hrefLeft', 'hrefRight'], | ||
}], | ||
'jsx-a11y/click-events-have-key-events': 0, | ||
'jsx-a11y/href-no-hash': 'off', | ||
'jsx-a11y/no-static-element-interactions': 0, | ||
'linebreak-style': ['error', os.EOL === '\r\n' ? 'windows' : 'unix'], | ||
'no-console': ['error', { | ||
allow: ['warn', 'error', 'info'], | ||
}], | ||
'no-underscore-dangle': 0, | ||
'react/destructuring-assignment': 0, | ||
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }], | ||
'react/jsx-filename-extension': [1, { | ||
extensions: ['.js', '.jsx'], | ||
}], | ||
'react/jsx-no-useless-fragment': 0, | ||
'react/jsx-one-expression-per-line': 0, | ||
'react/jsx-props-no-spreading': 0, | ||
'react/jsx-wrap-multilines': [1, { | ||
assignment: true, | ||
declaration: true, | ||
return: true, | ||
}], | ||
}, | ||
}; |
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 @@ | ||
* text=auto |
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