npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dagster-io/eslint-config

v2.0.0

Published

Shared eslint configuration for @dagster-io

Readme

@dagster-io/eslint-config

Shared ESLint configuration for Dagster applications.

Version 2.x+ requires ESLint 9 and uses the flat config format.

For ESLint 8 support, use version 1.x.

Installation

yarn add -D @dagster-io/eslint-config eslint@^9.0.0 prettier@^3.3.3

Usage

ESLint 9 Flat Config (eslint.config.js)

Create an eslint.config.js file in your project root:

const dagsterConfig = require('@dagster-io/eslint-config');

module.exports = [
  ...dagsterConfig,
  // Your custom overrides here
  {
    rules: {
      // Override specific rules
    },
  },
];

With Ignores

const dagsterConfig = require('@dagster-io/eslint-config');

module.exports = [
  ...dagsterConfig,
  {
    ignores: ['dist/**', 'build/**', '*.config.js'],
  },
];

With Additional Plugins

const dagsterConfig = require('@dagster-io/eslint-config');
const storybookPlugin = require('eslint-plugin-storybook');

module.exports = [
  ...dagsterConfig,
  ...storybookPlugin.configs['flat/recommended'],
  {
    // Additional configuration
  },
];

Migration from v1 to v2

Step 1: Upgrade Dependencies

yarn add -D eslint@^9.0.0 @dagster-io/eslint-config@^2.0.0

Step 2: Rename Config File

Rename .eslintrc.jseslint.config.js

Step 3: Update Config Format

Before (.eslintrc.js):

module.exports = {
  extends: ['@dagster-io/eslint-config'],
  ignorePatterns: ['dist/**'],
  overrides: [
    {
      files: ['*.test.ts'],
      rules: {
        '@typescript-eslint/no-explicit-any': 'off',
      },
    },
  ],
};

After (eslint.config.js):

const dagsterConfig = require('@dagster-io/eslint-config');

module.exports = [
  ...dagsterConfig,
  {
    ignores: ['dist/**'],
  },
  {
    files: ['*.test.ts'],
    rules: {
      '@typescript-eslint/no-explicit-any': 'off',
    },
  },
];

Step 4: Update Scripts (if needed)

ESLint 9 with flat config auto-detects files and config location.

Before:

{
  "scripts": {
    "lint": "eslint . --ext .ts,.tsx -c .eslintrc.js"
  }
}

After:

{
  "scripts": {
    "lint": "eslint ."
  }
}

Key Differences in Flat Config

  1. Config is an array - Multiple config objects can be specified
  2. No extends - Configs are imported and spread: ...dagsterConfig
  3. Ignores replace ignorePatterns - Use ignores: ['pattern'] in config objects
  4. Overrides are separate objects - Each override is its own config object in the array
  5. File patterns in files key - Override specific files with files: ['*.test.ts']

Custom Rules

This config includes custom Dagster-specific ESLint rules:

dagster-rules/missing-graphql-variables-type

Ensures GraphQL queries and mutations specify the Variables type parameter.

❌ Incorrect:

const {data} = useQuery<SomeQuery>(SOME_QUERY);

✅ Correct:

const {data} = useQuery<SomeQuery, SomeQueryVariables>(SOME_QUERY);

dagster-rules/no-oss-imports

Prevents relative imports of .oss files and enforces absolute path imports.

❌ Incorrect:

import {Component} from './Component.oss';

✅ Correct:

import {Component} from 'shared/components/Component.oss';

dagster-rules/no-apollo-client

Enforces using Dagster's wrapped Apollo client with performance instrumentation.

❌ Incorrect:

import {useQuery} from '@apollo/client';

✅ Correct:

import {useQuery} from '../apollo-client';
// or
import {useQuery} from '@dagster-io/ui-core/apollo-client';

dagster-rules/no-react-router-route

Enforces using Dagster's custom Route component instead of react-router-dom's.

❌ Incorrect:

import {Route} from 'react-router-dom';

✅ Correct:

import {Route} from '../app/Route';
// or
import {Route} from '@dagster-io/ui-core/app/Route';

dagster-rules/missing-shared-import

Validates that imports using the shared/ path reference files ending with .oss.

Included Rules and Plugins

This config includes:

  • TypeScript - @typescript-eslint recommended rules
  • React - React recommended rules + JSX runtime
  • Jest - Jest recommended rules
  • Prettier - Prettier integration with auto-formatting
  • Import - Import ordering and cycle detection
  • React Hooks - Rules of Hooks and exhaustive deps
  • Unused Imports - Auto-removal of unused imports
  • Custom Dagster Rules - Dagster-specific linting rules

Rule Highlights

  • Import Ordering - Automatically sorts imports by type and alphabetically
  • No Default Exports - Enforces named exports for better refactoring
  • No Unused Imports - Automatically removes unused imports
  • Restricted Imports - Prevents use of deprecated libraries (moment, lodash, etc.)
  • React Best Practices - Enforces modern React patterns
  • TypeScript Strictness - Disallows non-null assertions and other unsafe patterns

Compatibility

  • ESLint: ^9.0.0
  • Node.js: 18.18+, 20.9+, 21+
  • TypeScript: Any version (via typescript-eslint v8)

Legacy Version (ESLint 8)

If you need ESLint 8 support, install version 1.x:

yarn add -D @dagster-io/eslint-config@^1.0.0 eslint@^8.57.1

Then use the legacy .eslintrc.js format:

// .eslintrc.js
module.exports = {
  extends: ['@dagster-io/eslint-config'],
};

Contributing

This package is part of the Dagster monorepo. To make changes:

  1. Update the config in /js_modules/dagster-ui/packages/eslint-config
  2. Test locally with yarn lint and yarn test
  3. Update version in package.json
  4. Update CHANGELOG.md with changes
  5. Submit a PR

License

Apache-2.0