Skip to content

Commit

Permalink
update to use flow typed eslint plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Brianzchen committed Dec 11, 2021
1 parent 0770cc8 commit e088ef4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ yarn add -D eslint-config-bzc

In addition you will also need a list of peer dependencies for the linter to run properly
```
@babel/core @babel/eslint-parser @babel/plugin-syntax-flow @babel/plugin-transform-react-jsx eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-fb-flow eslint-plugin-flowtype eslint-plugin-react-hooks eslint-plugin-testing-library
@babel/core @babel/eslint-parser @babel/plugin-syntax-flow @babel/plugin-transform-react-jsx eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-fb-flow eslint-plugin-ft-flow eslint-plugin-react-hooks eslint-plugin-testing-library
```

## Set up
Expand Down
28 changes: 14 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
extends: [
'airbnb',
'plugin:flowtype/recommended',
'plugin:ft-flow/recommended',
],
env: {
browser: true,
Expand All @@ -13,36 +13,36 @@ module.exports = {
'react',
'jest',
'fb-flow',
'flowtype',
'ft-flow',
'react-hooks',
'testing-library',
],
settings: {
flowtype: {
'ft-flow': {
onlyFilesWithFlowAnnotation: true,
},
},
rules: {
camelcase: 0,
'fb-flow/use-indexed-access-type': 2,
'flowtype/array-style-complex-type': 2,
'flowtype/array-style-simple-type': 2,
'flowtype/delimiter-dangle': [
'ft-flow/array-style-complex-type': 2,
'ft-flow/array-style-simple-type': 2,
'ft-flow/delimiter-dangle': [
2,
'always-multiline',
],
'flowtype/no-weak-types': [2, {
'ft-flow/no-weak-types': [2, {
any: false,
Object: true,
Function: true,
}],
'flowtype/enforce-line-break': 2,
'flowtype/newline-after-flow-annotation': [2, 'never'],
'flowtype/object-type-curly-spacing': [2, 'always'],
'flowtype/quotes': [2, 'single'],
'flowtype/semi': [2, 'always'],
'flowtype/interface-id-match': ['error', '^_?([A-Z][A-Za-z0-9$]*I)$'],
'flowtype/type-id-match': ['error', '^_?([A-Z][A-Za-z0-9$]*T|Props)$'],
'ft-flow/enforce-line-break': 2,
'ft-flow/newline-after-flow-annotation': [2, 'never'],
'ft-flow/object-type-curly-spacing': [2, 'always'],
'ft-flow/quotes': [2, 'single'],
'ft-flow/semi': [2, 'always'],
'ft-flow/interface-id-match': ['error', '^_?([A-Z][A-Za-z0-9$]*I)$'],
'ft-flow/type-id-match': ['error', '^_?([A-Z][A-Za-z0-9$]*T|Props)$'],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/no-named-as-default': 0,
'import/order': [
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eslint-config-bzc",
"description": "Eslint Config for my personal and professional projects",
"version": "1.0.2",
"version": "1.0.3",
"main": "index.js",
"repository": "[email protected]:Brianzchen/eslint-config-bzc.git",
"author": "Brian Chen",
Expand All @@ -20,7 +20,7 @@
"@babel/plugin-transform-react-jsx": "^7.16.0",
"eslint-config-airbnb": ">=17.0.0 || >=18.0.0",
"eslint-plugin-fb-flow": ">=0.0.1",
"eslint-plugin-flowtype": ">=5.9.0",
"eslint-plugin-ft-flow": ">=0.1.2",
"eslint-plugin-react": ">=7.23.0",
"eslint-plugin-react-hooks": ">=4.0.0",
"eslint-plugin-testing-library": ">=4.0.0"
Expand Down

0 comments on commit e088ef4

Please sign in to comment.