eslint-plugin-oploshka

Shared ESLint 10 flat config for Vue and TypeScript projects
1,101
Install
npm install eslint-plugin-oploshka
Latest Version:10.0.2
License:ISC
Last Updated:Oct 6, 2026
Links: npm
Maintainer: oploshka

eslint-plugin-oploshka

Настройки eslint 9 под vue js

Историческая строка выше сохранена из предыдущей версии README. Начиная с 10.0.0 пакет предназначен только для ESLint 10 и Flat Config.

Требования

  • Node.js ^20.19.0 || ^22.13.0 || >=24
  • ESLint ^10.0.0
  • TypeScript >=4.8.4 <6.1.0

Использование

// eslint.config.js
import sharedConfig from 'eslint-plugin-oploshka';

export default [
  ...sharedConfig,
];

Проектные переопределения лучше добавлять после shared config:

import sharedConfig from 'eslint-plugin-oploshka';

export default [
  ...sharedConfig,
  {
    files: ['**/*.vue'],
    rules: {
      'vue/html-indent': 'off',
    },
  },
];

Storybook

Storybook не включён в shared config намеренно. Если проект использует Storybook, подключай его в eslint.config.js самого проекта:

import storybook from 'eslint-plugin-storybook';
import sharedConfig from 'eslint-plugin-oploshka';

export default [
  ...sharedConfig,
  ...storybook.configs['flat/recommended'],
  // Проектные overrides лучше оставлять последними.
];

Vue template: лишняя запятая между атрибутами

В конфиг добавлена отдельная защита от ошибки вида:

<MyComponent
  :foo="foo",
  :bar="bar"
/>

Такая запятая может превратиться в HTML-атрибут с именем , и в runtime привести к:

InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': ',' is not a valid attribute name

Теперь vue/no-restricted-static-attribute помечает это как ESLint error.

Миграция с 9.x

Версия 10.0.0 не сохраняет обратную совместимость с ESLint 9 и .eslintrc. Используется только Flat Config и defineConfig из eslint/config.

package-lock.json от ветки 9.x удалён при миграции, потому что он описывал старое дерево зависимостей. После checkout ветки нужно выполнить:

npm install
npm run lint

и при необходимости закоммитить новый package-lock.json.

Related Packages

eslint-plugin-vue-storefront

ESLint rules for Vue Storefront

39,292
@scayle/eslint-plugin-vue-composable

Rules to avoid unpleasant composable problems

207,394 4
@component-hook/eslint-plugin

ESLint config for component hook

8,834 4
@claylevering/eslint-config

A set of ESLint configurations supporting flat config format with Vue (and with...

30,479 1
eslint-plugin-test-id

This checks is data-test-id prop is present, on some tags which are useful for e...

10,384 17

Version History

Version Released License
10.0.2 ISC
10.0.1 ISC
9.0.6 ISC
9.0.5 ISC
9.0.4 ISC