SKY UX ESLint Config

raw JSON →
14.2.2 verified Sat Apr 25 auth: no javascript

Recommended ESLint configuration for SKY UX projects. Current stable version is 14.2.2, released April 2026 with frequent patch releases. This package provides a shared eslint.config extending from typescript-eslint, angular-eslint, and @eslint/js. It includes SKY UX-specific lint rules (e.g., no-sky-selectors) and stylelint integration. Key differentiators: it is the only config tailored to the SKY UX component library, automatically setting up recommended rules for Angular + TypeScript + SKY UX conventions. Requires Angular 19+, angular-eslint 21, and typescript-eslint 8.

error Error [ERR_REQUIRE_ESM]: require() of ES Module /node_modules/eslint-config-skyux/index.js not supported.
cause Using CommonJS require() to import an ESM-only package.
fix
Convert your eslint config to an .mjs file and use import instead of require().
error Configuration for rule '@angular-eslint/directive-selector' is invalid. Expected an array of objects, got string.
cause Incorrect format for rule configuration (common when migrating from eslintrc).
fix
Use array syntax: ['error', { type: 'attribute', prefix: 'app', style: 'camelCase' }]
error TypeError: skyux is not iterable
cause Forgetting to spread the skyux config inside tseslint.config() (e.g., using skyux directly without ...).
fix
Use tseslint.config(...skyux, ...otherConfigs)
error ESLint: Error while loading rule 'skyux-eslint/no-sky-selectors': Rule 'no-sky-selectors' is not defined.
cause Missing skyux-eslint package in dependencies.
fix
Run 'ng add eslint-config-skyux' or install 'skyux-eslint' as a dev dependency.
breaking Migrated from legacy eslintrc to flat config (eslint.config.*). Requires ESLint >=9 and removal of .eslintrc files.
fix Delete .eslintrc.* files and create eslint.config.mjs using the pattern shown in README.
breaking Requires projectService: true in parserOptions for typed lint rules to work correctly (since v14).
fix Set parserOptions.projectService: true in your config.
deprecated Support for Angular <19 dropped in v14; Angular 19+ required.
fix Upgrade to Angular 19 or later.
gotcha Must use ...skyux spread inside tseslint.config(), not directly in an array. Flat configs from different plugins may conflict.
fix Use tseslint.config(...skyux, ...). Do not manually merge config arrays.
breaking Dropped support for Node <18.19 (required for ESLint flat config).
fix Update Node.js to >=18.19 (recommended 22 LTS).
npm install eslint-config-skyux
yarn add eslint-config-skyux
pnpm add eslint-config-skyux

Minimal eslint.config.mjs setup for a SKY UX Angular project using flat config and typescript-eslint.

// eslint.config.mjs
import skyux from 'eslint-config-skyux';
import tseslint from 'typescript-eslint';

export default tseslint.config(
  ...skyux,
  {
    languageOptions: {
      parserOptions: {
        projectService: true,
        tsconfigRootDir: import.meta.dirname,
      },
    },
  },
  {
    files: ['**/*.ts'],
    rules: {
      '@angular-eslint/directive-selector': [
        'error',
        {
          type: 'attribute',
          prefix: 'app',
          style: 'camelCase',
        },
      ],
      '@angular-eslint/component-selector': [
        'error',
        {
          type: 'element',
          prefix: 'app',
          style: 'kebab-case',
        },
      ],
    },
  },
);