Skip to content

Commit

Permalink
BREAKING CHANGE:update config and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
LexSwed committed May 13, 2020
1 parent b106c52 commit d731a13
Show file tree
Hide file tree
Showing 6 changed files with 2,550 additions and 3,275 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '10'
- "12"

branches:
except:
Expand All @@ -12,7 +12,7 @@ script:
- yarn run lint

after_success:
- yarn run travis-deploy-once "npm run semantic-release"
- yarn run semantic-release

notifications:
email: false
118 changes: 0 additions & 118 deletions accessibility/lint-rules.js

This file was deleted.

83 changes: 14 additions & 69 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,94 +1,39 @@
const a11yLintRules = require('./accessibility/lint-rules')
const performanceRules = require('./performance/lint-rules')

module.exports = {
parser: 'babel-eslint',
extends: [
'standard',
'standard-jsx',
'plugin:react/recommended',
'react-app',
'plugin:jsx-a11y/recommended',
'prettier',
'prettier/@typescript-eslint',
'prettier/babel',
'prettier/react',
'prettier/standard',
],
plugins: [
'filenames',
'jsx-a11y',
'react',
'react-perf',
'react-hooks',
'jest',
],
settings: {
react: {
version: '16',
},
},
plugins: ['jest'],
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true,
'browser': true,
'commonjs': true,
'es6': true,
'jest': true,
'node': true,
'jest/globals': true,
},
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
generators: true,
},
},
rules: Object.assign({}, a11yLintRules, performanceRules, {
'react/jsx-no-target-blank': 'warn',
'react/no-danger': 'warn',
'react/jsx-sort-props': 'warn',
'react/jsx-handler-names': 'warn',
'react/jsx-no-bind': 'warn',
'react/sort-comp': [
'warn',
{
order: [
'static-methods',
'instance-variables',
'lifecycle',
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
'everything-else',
'/^render.+$/',
'render',
],
},
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
},
],
rules: {
'import/order': [
'warn',
{
'newlines-between': 'always',
},
],
'import/export': 'warn',
'filenames/match-regex': ['warn', '^_?[a-z0-9-.]+$'],
'jest/no-focused-tests': 'error',
'comma-dangle': ['error', 'always-multiline'],
complexity: ['warn', { max: 7 }],
'consistent-return': 'warn',
'global-require': 'warn',
'no-console': 'warn',
'no-else-return': 'warn',
'no-nested-ternary': 'warn',
'no-shadow': 'warn',
'no-unneeded-ternary': 'warn',
'object-shorthand': 'warn',
'prefer-const': 'warn',
'prefer-template': 'warn',
}),
}
},
};
47 changes: 25 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"repository": "git@github.com:Typeform/eslint-config-typeform.git",
"license": "LGPL 3.0",
"private": false,
"engines": {
"node": ">=10"
},
"scripts": {
"semantic-release": "semantic-release",
"travis-deploy-once": "travis-deploy-once --pro",
"test": "echo 'no tests' && exit 0",
"eslint": "eslint -c ./index.js",
"lint": "yarn run eslint ."
Expand All @@ -28,30 +29,32 @@
"access": "restricted"
},
"dependencies": {
"eslint-config-prettier": "^3.1.0",
"eslint-config-standard": "^12.0.0",
"eslint-config-standard-jsx": "^6.0.2",
"@typescript-eslint/eslint-plugin": "2.x",
"@typescript-eslint/parser": "2.x",
"eslint-config-prettier": "^6.11.0",
"eslint-config-react-app": "^5.2.1",
"eslint-config-standard": "^14.1.1",
"eslint-config-standard-jsx": "^8.1.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^22.6.4",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-react-hooks": "^1.6.0",
"eslint-plugin-react-perf": "^2.0.9",
"eslint-plugin-standard": "^4.0.0"
"eslint-plugin-flowtype": "4.x",
"eslint-plugin-import": "2.x",
"eslint-plugin-jest": "^23.11.0",
"eslint-plugin-jsx-a11y": "6.x",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "7.x",
"eslint-plugin-react-hooks": "^4.0.1",
"eslint-plugin-standard": "^4.0.1"
},
"peerDependencies": {
"babel-eslint": "^10.0.1",
"eslint": "^5.8.0"
"babel-eslint": "^10.0.0",
"eslint": "^5.0.0 || ^6.0.0 || ^7.0.0"
},
"devDependencies": {
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"husky": "^1.3.1",
"lint-staged": "^8.1.0",
"semantic-release": "^15.12.4",
"travis-deploy-once": "^5.0.9"
"babel-eslint": "^10.1.0",
"eslint": "^7.0.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.2",
"semantic-release": "^17.0.7"
}
}
9 changes: 0 additions & 9 deletions performance/lint-rules.js

This file was deleted.

0 comments on commit d731a13

Please sign in to comment.