diff --git a/README.md b/README.md index 59c8315..7370911 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/index.js b/index.js index 5b8e571..ede9d86 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ module.exports = { extends: [ 'airbnb', - 'plugin:flowtype/recommended', + 'plugin:ft-flow/recommended', ], env: { browser: true, @@ -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': [ diff --git a/package.json b/package.json index 19560dc..c5574fd 100644 --- a/package.json +++ b/package.json @@ -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": "git@github.com:Brianzchen/eslint-config-bzc.git", "author": "Brian Chen", @@ -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"