Skip to content

Commit

Permalink
chore(eslint-plugin)!: remove dependencies from ESLint plugin
Browse files Browse the repository at this point in the history
Closes #10740

BREAKING CHANGE: this removes the bundled dependencies and pre-defined rules from the ESLint 'reccomended' configuration.

Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops committed Jul 16, 2024
1 parent 640f3ad commit fac6286
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 11,764 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-testing-library": "^6.2.2",
"fs-extra": "^11.2.0",
"glob": "^10.4.1",
Expand Down
14 changes: 0 additions & 14 deletions packages/eslint-plugin-patternfly-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,3 @@ module.exports = {
extends: ['plugin:patternfly-react/recommended']
};
```

### Building

```
yarn build
```

Note the build scripts for this are located in the root package.json under `yarn build`.

### Publishing

```
yarn publish
```
66 changes: 3 additions & 63 deletions packages/eslint-plugin-patternfly-react/lib/config/recommended.js
Original file line number Diff line number Diff line change
@@ -1,72 +1,12 @@
module.exports = {
plugins: ['patternfly-react'],
rules: {
'patternfly-react/import-default-name': [
'error',
{
classnames: 'classNames',
'prop-types': 'PropTypes'
}
],
'jsx-a11y/heading-has-content': 'off',
'jsx-a11y/anchor-has-content': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true
}
],
'import/no-named-default': 'off',
'import/prefer-default-export': 'off',
'no-alert': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-prototype-builtins': 'off',
'no-restricted-syntax': 'off',
'no-underscore-dangle': 'off',
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'none',
ignoreRestSiblings: true
}
],
'no-use-before-define': 'off',
'prettier/prettier': [
'error',
{ semi: true, singleQuote: true, tabWidth: 2, trailingComma: 'none', useTabs: false, printWidth: 120 }
],
'react/no-array-index-key': 'off',
'react/forbid-prop-types': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-uses-vars': 'error',
'react/no-danger': 'off',
'react/sort-comp': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn'
},
extends: [
'standard',
'standard-react',
'standard-jsx',
'airbnb',
'plugin:jest/recommended',
'prettier',
'prettier/react',
'plugin:react-hooks/recommended'
],
env: {
es6: true,
browser: true,
node: true,
jest: true
},
plugins: ['prettier', 'jest', 'react', 'react-hooks', 'patternfly-react'],
parser: '@babel/eslint-parser'
]
}
};
17 changes: 0 additions & 17 deletions packages/eslint-plugin-patternfly-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,6 @@
"url": "https://github.com/patternfly/patternfly-react/issues"
},
"homepage": "https://github.com/patternfly/patternfly-react/blob/main/packages/eslint-plugin/README.md",
"dependencies": {
"@babel/eslint-parser": "^7.19.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard": "^17.0.0",
"eslint-config-standard-jsx": "^11.0.0",
"eslint-config-standard-react": "^13.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jest": "^27.0.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.7.0",
"eslint-plugin-react-hooks": "^4.1.2",
"eslint-plugin-rulesdir": "^0.2.0",
"eslint-plugin-standard": "^4.0.0"
},
"peerDependencies": {
"eslint": ">=5"
}
Expand Down
Loading

0 comments on commit fac6286

Please sign in to comment.