{"id":16019,"library":"eslint-config-wantedly-typescript","title":"Wantedly TypeScript ESLint Configuration","description":"eslint-config-wantedly-typescript provides a comprehensive ESLint configuration tailored for TypeScript projects, specifically designed for Wantedly's development ecosystem. Currently stable at version 4.0.0, this package aligns with the latest ESLint v9 and its new \"Flat Config\" format, offering a modern approach to linting. It bundles popular plugins and configurations, including `@typescript-eslint` for TypeScript-specific rules, `react` for JSX and React hooks, `import` for import statement validation, `jsx-a11y` for accessibility, `jest` for testing environments, and `prettier` for code formatting integration. While version 4.x exclusively supports the flat config format, earlier versions (3.x and below) provide compatibility with ESLint v8 and its legacy configuration style. The package aims to standardize code style and catch common errors in TypeScript, React, and related JavaScript projects. Releases generally follow major ESLint versions for compatibility updates, with smaller patches for dependency management and bug fixes.","status":"active","version":"4.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/wantedly/frolint#master","tags":["javascript","eslint"],"install":[{"cmd":"npm install eslint-config-wantedly-typescript","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-wantedly-typescript","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-wantedly-typescript","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for TypeScript linting. Ensure a compatible version is installed in your project.","package":"typescript","optional":false},{"reason":"Core dependency for ESLint configurations. Version 9.x is required for eslint-config-wantedly-typescript v4.x.","package":"eslint","optional":false}],"imports":[{"note":"Version 4.x and above use ESLint Flat Config, which requires ESM import syntax. The 'base' export contains the main configuration array.","wrong":"const configWantedlyTS = require('eslint-config-wantedly-typescript');","symbol":"configWantedlyTS","correct":"import { base as configWantedlyTS } from 'eslint-config-wantedly-typescript';"}],"quickstart":{"code":"import { base as configWantedlyTS } from 'eslint-config-wantedly-typescript';\n\nexport default [\n  ...configWantedlyTS,\n  {\n    // Optional: Add project-specific overrides or additional rules here.\n    // For example, to disable a rule:\n    rules: {\n      '@typescript-eslint/explicit-module-boundary-types': 'off',\n      'react/react-in-jsx-scope': 'off' // Example for React 17+ / New JSX Transform\n    }\n  },\n  {\n    // Define files glob patterns for this configuration scope\n    files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],\n    // You might need to specify parserOptions if your project uses different TypeScript settings\n    parserOptions: {\n      project: './tsconfig.json',\n      ecmaVersion: 'latest',\n      sourceType: 'module',\n      ecmaFeatures: {\n        jsx: true\n      }\n    }\n  }\n];","lang":"typescript","description":"Demonstrates how to set up `eslint-config-wantedly-typescript` v4.x using ESLint's Flat Config format in an `eslint.config.js` file, including basic customization."},"warnings":[{"fix":"Upgrade your ESLint installation to v9 or higher. If you must remain on ESLint v8, use `eslint-config-wantedly-typescript` version 3.x and maintain your legacy `.eslintrc` configuration files. Migrate your ESLint configuration to `eslint.config.js` using ESM import syntax.","message":"Version 4.0.0 of `eslint-config-wantedly-typescript` introduces support for ESLint v9 and its new Flat Config format. This is a breaking change for users on ESLint v8 or older, or those using the legacy `.eslintrc` configuration format.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Check your `package.json` for the `typescript` peer dependency range (e.g., `>=3.3.1`). Install a `typescript` version that satisfies this requirement, e.g., `npm install typescript@latest --save-dev`.","message":"The package has a peer dependency on `typescript`. Ensure you have a compatible version installed in your project. Incompatible TypeScript versions can lead to parsing errors or incorrect linting results.","severity":"gotcha","affected_versions":">=3.3.1"},{"fix":"Ensure all related `frolint` packages (e.g., `eslint-plugin-wantedly`) are updated to their v4.x versions to maintain compatibility when upgrading to ESLint v9.","message":"The `eslint-config-wantedly-typescript` package is now published under the `frolint` monorepo. While the package name remains the same, be aware of related packages like `eslint-plugin-wantedly` and `eslint-plugin-use-macros` also being updated to support ESLint v9.","severity":"breaking","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"For v4.x, ensure you are using an `eslint.config.js` file and importing the configuration using ESM syntax: `import { base as configWantedlyTS } from 'eslint-config-wantedly-typescript';`","cause":"Attempting to use `eslint-config-wantedly-typescript` v4.x with a legacy `.eslintrc` file's `extends` property, which expects a CommonJS module or an old configuration format.","error":"ESLint: Cannot find module 'eslint-config-wantedly-typescript'"},{"fix":"Upgrade ESLint to version 9.x or later (`npm install eslint@latest --save-dev`) and ensure your main configuration file is named `eslint.config.js` (or `.mjs`/`.cjs`).","cause":"Running ESLint < v9 or an ESLint instance not configured for Flat Config with an `eslint.config.js` file containing `eslint-config-wantedly-typescript` v4.x.","error":"Error: You are attempting to use a flat configuration file with a legacy eslint config. You should be using `eslint.config.js` or `eslint.config.mjs` or `eslint.config.cjs`."},{"fix":"Ensure your `eslint.config.js` or relevant parser options specify `sourceType: 'module'` in the parser configuration. For example: `parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }`.","cause":"Your ESLint configuration is not set up for ESM syntax, but `eslint-config-wantedly-typescript` v4.x itself uses ESM.","error":"Parsing error: 'import' and 'export' may only appear with 'sourceType: \"module\"'"}],"ecosystem":"npm"}