Skip to content

Commit

Permalink
Update eslint and prettier
Browse files Browse the repository at this point in the history
Update eslint, prettier, and related packages.

eslint is updated to 7.2 (7.3 is latest) due to compatibility
issue with latest eslint-config-airbnb.

Add some additional overrides to the eslint and prettier configs
to maintain our existing ruleset and minimise changes. We can
roll out the new defaults in a separate change if we want
(several hundred lines of change).
  • Loading branch information
AlanGreene authored and tekton-robot committed Jun 23, 2020
1 parent 8becd62 commit 6562447
Show file tree
Hide file tree
Showing 7 changed files with 383 additions and 295 deletions.
95 changes: 55 additions & 40 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,62 @@
/*
Copyright 2019-2020 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
module.exports = {
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true
parser: 'babel-eslint',
env: {
browser: true,
es6: true,
jest: true,
node: true
},
"extends": [
"airbnb",
"plugin:prettier/recommended",
"prettier/react"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: 'module'
},
"plugins": [
"notice",
"react"
],
"rules": {
"curly": ["error", "all"],
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": "off",
"jsx-a11y/anchor-is-valid": "off",
"no-case-declarations": "off",
"no-template-curly-in-string": "off",
"notice/notice": [
"error", { "templateFile": "config_frontend/copyright.txt", nonMatchingTolerance: 0.95 }
plugins: ['notice', 'react'],
rules: {
curly: ['error', 'all'],
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'no-case-declarations': 'off',
'no-template-curly-in-string': 'off',
'notice/notice': [
'error',
{
templateFile: 'config_frontend/copyright.txt',
nonMatchingTolerance: 0.95
}
],
"react/jsx-filename-extension": "off",
"react/destructuring-assignment": "off",
"react/prop-types": "off",
"sort-imports": ["error", {
"ignoreCase": true,
"ignoreDeclarationSort": true
}]
'react/destructuring-assignment': 'off',
'react/jsx-curly-newline': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
'react/state-in-constructor': 'off',
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true
}
]
}
};
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"arrowParens": "avoid",
"singleQuote": true,
"trailingComma": "none"
}
Loading

0 comments on commit 6562447

Please sign in to comment.