![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
eslint-plugin-wkovacs64
Advanced tools
My personal ESLint plugin.
npm install --save-dev eslint-plugin-wkovacs64
Be sure to install the appropriately versioned
eslint
peer dependency as well.
Several ESLint configs come bundled with this plugin. To use them, simply extend the relevant config(s) in your project's ESLint settings.
First, choose a single "core" config. It must come before the other
configurations (described below) in your extends
array.
Project Type | Extends |
---|---|
Base (no React) | 'plugin:wkovacs64/base' |
React | 'plugin:wkovacs64/react' |
Next, you may augment the core configuration by applying any combination of "feature" configs.
Feature | Extends |
---|---|
Jest | 'plugin:wkovacs64/jest' |
jest-dom | 'plugin:wkovacs64/jest-dom' |
Testing Library | 'plugin:wkovacs64/testing-library' |
TypeScript | 'plugin:wkovacs64/typescript' |
⚠️ The
typescript
feature config requires theparserOptions.project
property to be set in your ESLint config. See the TypeScript parser options for more information.
- If you're using Cypress, you may need to add
ignorePatterns: ['cypress.config.ts']
to your ESLint config.- If you're using the
jest
feature config, you may need to disable the@typescript-eslint/unbound-method
rule and enable thejest/unbound-method
rule instead.
Finally, you may apply the Prettier config. This must
be last in your extends
array.
Extends |
---|
'prettier' |
Base "vanilla JS" project with Jest and Prettier:
module.exports = {
extends: ['plugin:wkovacs64/base', 'plugin:wkovacs64/jest', 'prettier'],
};
React project with Jest, jest-dom, Testing Library, and Prettier:
module.exports = {
extends: [
'plugin:wkovacs64/react',
'plugin:wkovacs64/jest',
'plugin:wkovacs64/jest-dom',
'plugin:wkovacs64/testing-library',
'prettier',
],
};
Base project with Jest, TypeScript, and Prettier:
module.exports = {
extends: [
'plugin:wkovacs64/base',
'plugin:wkovacs64/jest',
'plugin:wkovacs64/typescript',
'prettier',
],
parserOptions: {
project: 'tsconfig.json',
},
};
Kitchen sink:
module.exports = {
extends: [
'plugin:wkovacs64/react',
'plugin:wkovacs64/jest',
'plugin:wkovacs64/jest-dom',
'plugin:wkovacs64/testing-library',
'plugin:wkovacs64/typescript',
'prettier',
],
parserOptions: {
project: 'tsconfig.json',
},
ignorePatterns: ['cypress.config.ts'],
overrides: [
{
files: ['src/**/*.test.ts'],
rules: {
'@typescript-eslint/unbound-method': 'off',
'jest/unbound-method': 'error',
},
},
],
};
The dependency management overhead of separate shareable ESLint configs for each
scenario finally got to me. At the time of this writing, I no longer care if I
get peerDependency warnings about TypeScript in non-TypeScript projects (for
example) anymore if it means managing a single dependency (this package). The
implementation details of this project were heavily inspired by
@shopify/eslint-plugin
.
The resolution of the "bundled" plugins may only be working as a happy accident
due to Yarn (flatter node_modules
) and possibly ESLint hoisting (unreliable).
But until ESLint provides an official way to include plugins as dependencies of
shared configs, this will have to do. For reference:
This module is distributed under the MIT License.
16.2.0
88e9964
Thanks @wKovacs64! - update @typescript-eslint/*
to v7.7.1
#139 2c555a6
Thanks @renovate! - update eslint-plugin-jest to v28
c76315a
Thanks @wKovacs64! - update eslint-plugin-react
to v7.34.1
ce57d00
Thanks @wKovacs64! - update eslint-plugin-jest
to v28.3.0
64e3de2
Thanks @wKovacs64! - update eslint-plugin-jest-dom
to v5.4.0
463974f
Thanks @wKovacs64! - update eslint-plugin-react-hooks
to v4.6.2
ef7e39a
Thanks @wKovacs64! - update @rushstack/eslint-patch
to v1.10.2
44d828a
Thanks @wKovacs64! - update @babel/eslint-parser
to v7.24.1
7f353d9
Thanks @wKovacs64! - update eslint-plugin-testing-library
to v6.2.2
7d86cb9
Thanks @wKovacs64! - update @babel/plugin-syntax-jsx
to v7.24.1
0f3c395
Thanks @wKovacs64! - update @babel/core
to v7.24.4
FAQs
@wKovacs64 ESLint plugin
We found that eslint-plugin-wkovacs64 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.