
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
neostandard
Advanced tools
standardnpm install -D neostandard eslintnpx neostandard --help, see #267)npx neostandard --migrate > eslint.config.js (uses our config helper)standard with eslint in all places where you run standard, eg. "scripts" and .github/workflows/ (neostandard CLI tracked in #2)npm uninstall standard"standard" top level key from your package.jsonstandard specific integrations if you no longer use them (eg. vscode-standard))npm install -D neostandard eslint
Add an eslint.config.js:
Using config helper:
npx neostandard --esm > eslint.config.js
Or to get CommonJS:
npx neostandard > eslint.config.js
Or manually create the file as ESM:
import neostandard from 'neostandard'
export default neostandard({
// options
})
Or as CommonJS:
module.exports = require('neostandard')({
// options
})
Run neostandard by running ESLint, eg. using npx eslint, npx eslint --fix or similar
All examples below use ESM (ECMAScript Modules) syntax. If you're using CommonJS (CJS), replace the import/export statements with the following:
// Replace
import neostandard from 'neostandard'
export default neostandard({ /* options */ })
// With
const neostandard = require('neostandard')
module.exports = neostandard({ /* options */ })
Here's a basic example of how to configure neostandard:
import neostandard from 'neostandard'
export default neostandard({
ts: true, // an option
// Add other options here
})
The options below allow you to customize neostandard for your project. Use them to add global variables, ignore files, enable TypeScript support, and more.
env - string[] - adds additional globals by importing them from the globals npm module
import neostandard from 'neostandard'
export default neostandard({
env: ['browser', 'mocha'], // Add browser and mocha global variables
})
files - string[] - additional file patterns to match. Uses the same shape as ESLint files
import neostandard from 'neostandard'
export default neostandard({
files: ['src/**/*.js', 'tests/**/*.js'], // Lint only files in src/ and tests/ directories
})
filesTs - string[] - additional file patterns for the TypeScript configs to match. Uses the same shape as ESLint files
import neostandard from 'neostandard'
export default neostandard({
ts: true, // Enable TypeScript support
filesTs: ['src/**/*.ts', 'tests/**/*.ts'], // Lint only TypeScript files in src/ and tests/ directories
})
globals - string[] | object - an array of names of globals or an object of the same shape as ESLint languageOptions.globals
Using an array:
import neostandard from 'neostandard'
export default neostandard({
globals: ['$', 'jQuery'], // Treat $ and jQuery as global variables
})
Using an object:
import neostandard from 'neostandard'
export default neostandard({
globals: {
$: 'readonly', // $ is a read-only global
jQuery: 'writable', // jQuery can be modified
localStorage: 'off', // Disable the localStorage global
},
})
ignores - string[] - an array of glob patterns for files that the config should not apply to, see ESLint documentation for details
import neostandard from 'neostandard'
export default neostandard({
ignores: ['dist/**/*', 'tests/**'], // Ignore files in dist/ and tests/ directories
})
noJsx - boolean - if set, no jsx rules will be added. Useful if for some reason its clashing with your use of JSX-style syntax
import neostandard from 'neostandard'
export default neostandard({
noJsx: true, // Disable JSX-specific rules
})
noStyle - boolean - if set, no style rules will be added. Especially useful when combined with Prettier, dprint or similar
import neostandard from 'neostandard'
export default neostandard({
noStyle: true, // Disable style-related rules (useful with Prettier or dprint)
})
semi - boolean - if set, enforce rather than forbid semicolons (same as semistandard did)
import neostandard from 'neostandard'
export default neostandard({
semi: true, // Enforce semicolons (like semistandard)
})
ts - boolean - if set, TypeScript syntax will be supported and *.ts (including *.d.ts) will be checked. To add additional file patterns to the TypeScript checks, use filesTs
import neostandard from 'neostandard'
export default neostandard({
ts: true, // Enable TypeScript support and lint .ts files
})
The neostandard() function returns an ESLint config array which is intended to be exported directly or, if you want to modify or extend the config, can be combined with other configs like any other ESLint config array:
import neostandard from 'neostandard'
import jsdoc from 'eslint-plugin-jsdoc';
export default [
...neostandard(),
jsdoc.configs['flat/recommended-typescript-flavor'],
]
Do note that neostandard() is intended to be a complete linting config in itself, only extend it if you have needs that goes beyond what neostandard provides, and open an issue if you believe neostandard itself should be extended or changed in that direction.
It's recommended to stay compatible with the plain config when extending and only make your config stricter, not relax any of the rules, as your project would then still pass when using just the plain neostandard-config, which helps people know what baseline to expect from your project.
As of neostandard v1.0.0, eslint-plugin-import-x has been removed to reduce dependency weight and installation complexity. For most projects, TypeScript's compiler (tsc) provides superior import/export checking with full project context.
If you still need ESLint-based import checking, you can add it back manually:
import neostandard from 'neostandard'
import importX from 'eslint-plugin-import-x'
export default [
...neostandard(),
{
plugins: {
'import-x': importX
},
rules: {
'import-x/export': 'error',
'import-x/first': 'error',
'import-x/no-absolute-path': ['error', { esmodule: true, commonjs: true, amd: false }],
'import-x/no-duplicates': 'error',
'import-x/no-named-default': 'error',
'import-x/no-webpack-loader-syntax': 'error',
}
}
]
For TypeScript projects, you may also want to add the TypeScript resolver:
import neostandard from 'neostandard'
import importX from 'eslint-plugin-import-x'
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'
export default [
...neostandard(),
{
plugins: {
'import-x': importX
},
settings: {
'import-x/resolver-next': [
createTypeScriptImportResolver({
project: './tsconfig.json'
})
]
},
rules: {
'import-x/export': 'error',
'import-x/first': 'error',
'import-x/no-absolute-path': ['error', { esmodule: true, commonjs: true, amd: false }],
'import-x/no-duplicates': 'error',
'import-x/no-named-default': 'error',
'import-x/no-webpack-loader-syntax': 'error',
}
}
]
Recommended alternative: Use TypeScript's compiler for import checking instead:
tsc --noEmit
This provides more comprehensive checking including type imports, module resolution, and cross-file validation.
Finds a .gitignore file that resides in the same directory as the ESLint config file and returns an array of ESLint ignores that matches the same files.
ESM:
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'
export default neostandard({
ignores: resolveIgnoresFromGitignore(),
})
CommonJS:
module.exports = require('neostandard')({
ignores: require('neostandard').resolveIgnoresFromGitignore(),
})
neostandard exports all the ESLint plugins that it uses. This to ensure that users who need to reference the plugin themselves will use the exact same instance of the plugin, which is a necessity when a plugin prefix is defined in multiple places.
@stylistic - export of @stylistic/eslint-pluginn - export of eslint-plugin-npromise - export of eslint-plugin-promisereact - export of eslint-plugin-reacttypescript-eslint - export of typescript-eslintIf one eg. wants to add the eslint-plugin-n recommended config, then one can do:
import neostandard, { plugins } from 'neostandard'
export default [
...neostandard(),
plugins.n.configs['flat/recommended'],
]
Full list in 1.0.0 milestone
standard-engineeslint-stylistic rulesstandard behaviour of bundling JSX-support (ported from eslint-config-standard-jsx) with a noJsx option that deactivates it to match eslint-config-standardts option makes *.ts files be checked as well (used to be handled by ts-standard)semi option enforces rather than ban semicolons (used to be handled by semistandard)noStyle option deactivates style rules (used to require something like eslint-config-prettier)@stylistic/comma-dangle – changed – set to ignore dangling commas in arrays, objects, imports, exports and is it set to warn rather than error@stylistic/no-multi-spaces – changed – sets ignoreEOLComments to true, useful for aligning comments across multiple linedot-notation – deactivated – clashes with the noPropertyAccessFromIndexSignature check in TypeScriptn/no-deprecated-api – changed – changed to warn instead of error as they are not urgent to fixYou can use the provided CLI tool to generate a config for you:
neostandard --semi --ts > eslint.config.js
To see all available flags, run:
neostandard --help
The CLI tool can also migrate an existing "standard" configuration from package.json:
neostandard --migrate > eslint.config.js
Migrations can also be extended, so to eg. migrate a semistandard setup, do:
neostandard --semi --migrate > eslint.config.js
Yes! If you use neostandard in your project, you can include one of these badges in
your readme to let people know that your code is using the neostandard style.
[](https://github.com/neostandard/neostandard)
[](https://github.com/neostandard/neostandard)
[](https://github.com/neostandard/neostandard)
Prior to the 1.0.0 release we are still rapidly evolving with fixes and improvements to reach rule parity with standard, hence more breaking changes will be experienced until then, as well as evolution of this statement
neostandard intends to set an expectable baseline for project linting that's descriptive of best practices rather than prescriptive of any opinionated approach.
neostandard rules describes current best practices in the community and help align developers, contributors and maintainers along thoseneostandard rules are not a tool to promote changed practices within the community by prescribing new such practicesneostandard rule changes and additions should be aligned with projects prior to being released, by eg. sending PR:s to them to align them ahead of time. When new best practices are incompatible with current best practices, rules should first be relaxed to allow for both approaches, then be made stricter when the community has moved to the new approachneostandard rule changes and additions should improve the description of project best practices, not prescribe new practicesneostandard should, when faced with no clear best practice, avoid adding such a rule as it risks becoming prescriptive rather than descriptive. If leaving out such a rule would make neostandard an incomplete baseline config, and the community is split between a few clear alternatives (such as semi), then making it configurable can enable it to still be added, but that should only be done in exceptional casesneostandard is a community project with open governance.
See GOVERNANCE.md for specifics.
A subset of some of the projects that rely on neostandard:
FAQs
A modern successor to standard
The npm package neostandard receives a total of 132,929 weekly downloads. As such, neostandard popularity was classified as popular.
We found that neostandard demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.