ESLint Blog

フィード

記事のアイキャッチ画像
ESLint v9.15.0 released
ESLint Blog
This release updates the @eslint/plugin-kit dependency to the latest version 0.2.3 which includes the fix for security advisory GHSA-7q7g-4xm8-89cq.Highlightsmeta.defaultOptionsRules can now specify default options. ESLint will recursively merge any user-provided options elements on top of the default elements.This feature makes it easier to work with options in rules.// my-rule.jsexport default { meta: { defaultOptions: [{ alias: "basic", ignoreClassFields: false }], schema: [{ type: "object", properties: { alias: { type: "string" }, ignoreClassFields: { type: "boolean" } }, additionalProperties: false }] }, create(context) { // `context.options` is guaranteed to be an array with a single object // that has a string property `alias` and a boolean property `ignoreClassFields`. // If the rule is enabled with no options specified in the configuration file, // `alias` will be `"basic"`, and `ignoreClassFields` will be `false`. const [{ alias, ignoreClassFields }] = context.options; return
4日前
記事のアイキャッチ画像
ESLint v9.14.0 released
ESLint Blog
HighlightsSupport for Import AttributesWe have updated ESLint to fully support the ECMAScript 2025 Import Attributes syntax. This syntax allows module import statements and dynamic imports to pass on more information alongside the module specifier. Host environments can use this information to modify import behavior and support additional types of modules. For example, when type: "json" is specified, modules are treated as JSON Modules.import json from "./foo.json" with { type: "json" };import("foo.json", { with: { type: "json" } });The updates in ESLint include parsing and ensuring that naming convention rules do not apply to import attribute keys as they are defined by the ECMAScript Specification or by the host environment and thus users have no control over their naming.Please note that deprecated formatting rules will not be updated to support this syntax. If you are still using core formatting rules, we recommend switching to a source code formatter. Alternatively, you can replac
18日前
記事のアイキャッチ画像
ESLint v9.13.0 released
ESLint Blog
HighlightsThe predefined array of config objects used by ESLint can be now accessed programmatically as ESLint.defaultConfig.To speed up loading, the ESLint CLI will automatically enable V8’s code cache in newer versions of Node.js.Custom languages can now provide their default options with the defaultLanguageOptions property. See the documentation about the Language object.Features381c32b feat: Allow languages to provide defaultLanguageOptions (#19003) (Milos Djermanovic)bf723bd feat: Improve eslintrc warning message (#19023) (Milos Djermanovic)1def4cd feat: drop support for jiti v1.21 (#18996) (Francesco Trotta)f879be2 feat: export ESLint.defaultConfig (#18983) (Nitin Kumar)Bug Fixes78836d4 fix: update the complexity rule type (#19027) (Nitin Kumar)064c8b6 fix: update rule types (#18925) (Nitin Kumar)Documentationabdbfa8 docs: mark LintMessage#nodeType as deprecated (#19019) (Nitin Kumar)19e68d3 docs: update deprecated rules type definitions (#19018) (Nitin Kumar)7dd402d docs: Update
1ヶ月前
記事のアイキャッチ画像
no-unused-binary-expressions: From code review nit to ecosystem improvements
ESLint Blog
Four years ago, while doing a code review at work, I was surprised that Flow had not warned about an unnecessary null check. Last month, TypeScript 5.6 released with validation rules that disallows useless nullish and truthy checks which uncovered nearly 100 existing bugs in the top 800 TypeScript repos on GitHub.The two events are connected because that moment in code review four years ago led me to write the no-constant-binary-expressions rule which catches a wide variety of bugs. Examples include:// Expecting empty objects to be falsyconst foo = { ...config } || {};// Confusing precedence of !const foo1 = !x == null;// Confusing ?? or || precedenceconst foo2 = x === y ?? true;The no-constant-binary-expression rule, in turn, helped inspire the newly added TypeScript validations.Given the protracted timeline and the many intermediate steps, I thought it would be interesting to reflect on how we got here. How did this observation in one code review snowball into a significant positive
1ヶ月前
記事のアイキャッチ画像
ESLint v9.12.0 released
ESLint Blog
HighlightsExperimental configuration file resolutionOne of the big changes in ESLint v9.0.0 was the new config system which switched from looking for config files relative to the file being linted to starting the search from the current working directory. While this dramatically decreased the complexity of config file lookup, it also had an unintended side effect: monorepos could no longer include a separate eslint.config.js file in each project directory and then run ESLint with one command from the root. To address this, we’re working on a new configuration file resolution algorithm that more closely mirrors how the eslintrc config system worked.This new algorithm also starts the search from the file being linted, restoring the monorepo use case and also making it possible to run ESLint from anywhere on any file and get the same results each time. Because this feature is experimental, you’ll need to use the unstable_config_lookup_from_file feature flag, like this:npx eslint --flag un
2ヶ月前
記事のアイキャッチ画像
ESLint now officially supports linting of JSON and Markdown
ESLint Blog
Back in July we announced ourplan for ESLint going forward. Part of that announcement discussed transitioningESLint to be a more general-purpose linter that is capable of linting anylanguage. A lot of the core functionality of ESLint (finding files, parsingthen, reporting problems) is generic, and so we’ve spent the past few monthsextracting the JavaScript-specific parts of the core. We’re now happy to sharethat this work has paid by allowing ESLint to now lint both JSON and Markdown!JSON linting with @eslint/jsonJSON linting is accomplished using the@eslint/json plugin, which is anofficially supported language plugin. The plugin provides parsing for JSON,JSONC (JSON with comments), and JSON5. To use the plugin, install it from npm:npm install @eslint/json -DThen update your configuration file:import json from "@eslint/json";export default [ { plugins: { json, }, }, // lint JSON files { files: ["**/*.json"], language: "json/json", rules: { "json/no-duplicate-keys": "error", }, },];Ther
2ヶ月前
記事のアイキャッチ画像
ESLint v9.11.1 released
ESLint Blog
HighlightsSeveral type packages have been added as dependencies to fix compilation errors when ESLint is used in TypeScript code.Bug Fixes20fd916 fix: add @eslint/core, @types/estree, & @types/json-schema deps (#18938) (Nitin Kumar)2738322 fix: add missing types for require-atomic-updates rule (#18937) (Kristóf Poduszló)d71ff30 fix: add missing types for object-shorthand rule (#18935) (Kristóf Poduszló)561cadc fix: add missing types for no-unsafe-negation rule (#18932) (Kristóf Poduszló)8843656 fix: add missing types for no-underscore-dangle rule (#18931) (Kristóf Poduszló)92cde5c fix: add missing types for no-shadow rule (#18930) (Kristóf Poduszló)b3cbe11 fix: add missing types for no-sequences rule (#18929) (Kristóf Poduszló)976f77f fix: add missing types for no-unused-expressions rule (#18933) (Kristóf Poduszló)Documentation3eff709 docs: replace deprecated Linter.FlatConfig type with Linter.Config (#18941) (Carlos Meira)Choresdf4a859 chore: upgrade @eslint/[email protected] (#18943) (Milos
2ヶ月前
記事のアイキャッチ画像
ESLint v9.11.0 released
ESLint Blog
HighlightsThe no-useless-constructor rule now provides suggestions for some of the problems reported by this rule.Featuresec30c73 feat: add “eslint/universal” to export Linter (#18883) (唯然)c591da6 feat: Add language to types (#18917) (Nicholas C. Zakas)492eb8f feat: limit the name given to ImportSpecifier in id-length (#18861) (Tanuj Kanti)19c6856 feat: Add no-useless-constructor suggestion (#18799) (Jordan Thomson)a48f8c2 feat: add type FormatterFunction, update LoadedFormatter (#18872) (Francesco Trotta)Bug Fixes5e5f39b fix: add missing types for no-restricted-exports rule (#18914) (Kristóf Poduszló)8f630eb fix: add missing types for no-param-reassign options (#18906) (Kristóf Poduszló)d715781 fix: add missing types for no-extra-boolean-cast options (#18902) (Kristóf Poduszló)2de5742 fix: add missing types for no-misleading-character-class options (#18905) (Kristóf Poduszló)c153084 fix: add missing types for no-implicit-coercion options (#18903) (Kristóf Poduszló)fa11b2e fix: add mis
2ヶ月前
記事のアイキャッチ画像
ESLint v8.57.1 released
ESLint Blog
HighlightsNotable bug fixes related to the new config system (eslint.config.js):Config name property can now also be used with global ignores.--no-ignore no longer applies to non-global ignores.The FlatESLint#lintText() method will now respect the fixTypes option when it is specified.This version also improves configuration error messages by including the name property (if specified on the config object that caused the error), or index in case of non-object elements in the config array.Bug Fixesa19072f fix: add logic to handle fixTypes in the lintText() method (#18900) (Francesco Trotta)04c7188 fix: Don’t lint same file multiple times (#18899) (Francesco Trotta)87ec3c4 fix: do not throw when defining a global named __defineSetter__ (#18898) (Francesco Trotta)60a1267 fix: Provide helpful error message for nullish configs (#18889) (Milos Djermanovic)a0dea8e fix: allow name in global ignores, fix --no-ignore for non-global (#18875) (Milos Djermanovic)3836bb4 fix: do not crash on error in
2ヶ月前
記事のアイキャッチ画像
Version support policy and ESLint v8.x end of life
ESLint Blog
For ESLint’s entire 11 year existence, we’ve only maintained one major release line at a time. This was both for practical reasons (limited team bandwidth) and technical reasons (our infrastructure was built to assume just one branch). Unfortunately, we haven’t been good at communicating our version support policy, which has led to confusion and frustration when we do a major release.Adopting a formal version support policyThe Technical Steering Committee has adopted a formal version support policy that explains our approach to supporting major release lines. In general, a major release line may be in one of the following statuses:Current - Receives active maintenance and development from the ESLint team. A release line is considered current when prerelease work begins.Maintenance - Receives critical bug fixes, including security issues, and compatibility fixes to ensure interoperability between major release lines. There is no backporting of other fixes or features from the current re
2ヶ月前
記事のアイキャッチ画像
ESLint v9.10.0 released
ESLint Blog
HighlightsTypes now includedWe’ve been receiving complaints about the @types/eslint package not being updated after the v9 release. While we did do an initial update to the package for v9, it quickly became apparent that regular updates to that package could not be accomplished in a timely manner. Ultimately, we decided that the only way for us to provide the type of experience we want for ESLint is to take complete ownership of the type definitions.As a result, beginning with this release, the eslint package now publishes its own types. To start, we’ve copied the type definitions from @types/eslint in order to provide a smooth transition. (There was one bug in the types that we fixed, but otherwise it’s the same type definitions.) Going forward, we’ll continue to iterate and improve the type definitions as part of our regular release cycle.We’re grateful to everyone who contributed types to the @types/eslint package at a time when we weren’t ready to take that work on.Other notable ch
2ヶ月前
記事のアイキャッチ画像
Trunk becomes ESLint gold sponsor
ESLint Blog
We are happy to share that Trunk has become an ESLint gold sponsor, donating $1,000 each month for the ongoing maintenance and development of ESLint! Trunk is a suite of tools aimed at making developers more effective, including Code Quality that integrates ESLint directly, and Merge Queue, with more tools in development.Here’s what the folks at Trunk had to say about ESLint:"ESLint is a core part of the Trunk Code Quality plugin ecosystem. It’s the most popular linter plugin and is enabled by default on all JS and TS projects running Code Quality. ESLint also runs on all of Trunk’s Typescript source code.Code Quality, as a metalinter, is built on top of great open-source linters like ESLint. Sponsoring ESLint and helping ESLint leverage Trunk Code Quality on their open-source repo is an excellent way for us to give back."– David Apirian, Trunk FounderThe ESLint team and the Trunk team worked together over the past few months to integrate Code Quality into the ESLint repository, where
2ヶ月前
記事のアイキャッチ画像
ESLint v9.9.1 released
ESLint Blog
HighlightsThe lintText() method will now respect the fixTypes option when it is specified.Bug Fixes9bde90c fix: add logic to handle fixTypes in lintText() (#18736) (Amaresh S M)Documentation4840930 docs: Update README with version support and clean up content (#18804) (Nicholas C. Zakas)f61f40d docs: Update globals examples (#18805) (Nicholas C. Zakas)241fcea docs: Use and define languages (#18795) (Nicholas C. Zakas)5dbdd63 docs: eslint-plugin-markdown -> @eslint/markdown (#18797) (Nicholas C. Zakas)c6c8ddd docs: update links to eslint-visitor-keys repo (#18796) (Francesco Trotta)f981d05 docs: Update README (GitHub Actions Bot)b516974 docs: update links to eslint/js repo (#18781) (Francesco Trotta)fb7a3f5 docs: update note for package managers (#18779) (Jay)Choresb0c34d0 chore: upgrade to @eslint/[email protected] (#18809) (Francesco Trotta)cd5a0da chore: package.json update for @eslint/js release (Jenkins)e112642 refactor: Extract parsing logic from Linter (#18790) (Nicholas C. Zakas)0f68a85
3ヶ月前
記事のアイキャッチ画像
ESLint v9.9.0 released
ESLint Blog
HighlightsHere are some of the key changes in this release.Experimental TypeScript configuration filesArya Emami landed experimental support for TypeScript configuration files. Specifically, you can now use eslint.config.ts, eslint.config.mts, and eslint.config.cts files as your configuration files. Because this feature is experimental, you’ll need to use the unstable_ts_config feature flag:npx eslint --flag unstable_ts_configFor Node.js, you’ll need to manually install jiti, which provides the TypeScript-to-JavaScript functionality; for Deno and Bun, no additional dependency is necessary. (When TypeScript type stripping lands as stable in Node.js, you also won’t need an additional dependency in Node.js)For more information on this feature, see TypeScript Configuration Files. For more information on using feature flags, see Feature Flags.Other notable changesThe require-await rule now suggests to remove possibly unnecessary usages of the async keyword.Features41d0206 feat: Add support
3ヶ月前
記事のアイキャッチ画像
ESLint v9.8.0 released
ESLint Blog
HighlightsIgnoring the directory where ESLint runs is no longer possible. Previously, a global ignores pattern like "/" would ignore the entire base directory.The feature flags specification has been updated to forbid the usage of inactive flags.Features13d0bd3 feat: Add and use SourceCode#getLoc/getRange (#18703) (Nicholas C. Zakas)Bug Fixesab0ff27 fix: Throw error when invalid flags passed (#18705) (Nicholas C. Zakas)70dc803 fix: basePath directory can never be ignored (#18711) (Milos Djermanovic)Documentation282df1a docs: Add system theme option (#18617) (Amaresh S M)53b1ff0 docs: Debug config docs (#18698) (Nicholas C. Zakas)a7016a5 docs: fix search input stylings (#18682) (Amaresh S M)Build Related4514424 build: Enable JSON linting (#18681) (Nicholas C. Zakas)Choresdeee448 chore: upgrade to @eslint/[email protected] (#18720) (Francesco Trotta)4aaf2b3 chore: package.json update for @eslint/js release (Jenkins)8e1a627 chore: update dependency @eslint/core to ^0.2.0 (#18700) (renovate[bot])
4ヶ月前
記事のアイキャッチ画像
ESLint v9.7.0 released
ESLint Blog
HighlightsESLint v9.7.0 supports ECMAScript 2025 duplicate capturing groups in regular expressions in its core rules.The no-restricted-imports rule has a new option regex to specify modules using a regular expression pattern.Features7bd9839 feat: add support for es2025 duplicate named capturing groups (#18630) (Yosuke Ota)1381394 feat: add regex option in no-restricted-imports (#18622) (Nitin Kumar)Bug Fixes14e9f81 fix: destructuring in catch clause in no-unused-vars (#18636) (Francesco Trotta)Documentation9f416db docs: Add Powered by Algolia label to the search. (#18633) (Amaresh S M)c8d26cb docs: Open JS Foundation -> OpenJS Foundation (#18649) (Milos Djermanovic)6e79ac7 docs: loadESLint does not support option cwd (#18641) (Francesco Trotta)Chores793b718 chore: upgrade @eslint/[email protected] (#18680) (Francesco Trotta)7ed6f9a chore: package.json update for @eslint/js release (Jenkins)7bcda76 refactor: Add type references (#18652) (Nicholas C. Zakas)51bf57c chore: add tech sponsors through
4ヶ月前
記事のアイキャッチ画像
What's coming next for ESLint
ESLint Blog
When we released ESLint v9.0.0 in April, it was the first major release in 30 months and formally introduced the new configuration system. ESLint v9.0.0 also made some rule API changes to prepare the core for what’s coming next. After the release, we spent a lot of time creating compatibility utilities, a configuration migration tool, and a rule API transform utility to help the ecosystem move to ESLint v9.0.0. All of that work was necessary for us to move on to the next significant changes coming to ESLint.Language pluginsTwo years ago, the TSC decided that it was time to open up ESLint to make it possible to lint languages other than JavaScript. Practically speaking, there are a lot of things that the ESLint core does that are not specific to JavaScript: the finding and reading of files, the loading of file-specific configuration, collecting rule violations, outputting results to the console, and so on. Further, we kept finding plugins that were linting other languages (like GraphQL
4ヶ月前
記事のアイキャッチ画像
ESLint v9.6.0 released
ESLint Blog
HighlightsESLint’s default parser espree now supports RegExp duplicate named capturing groups ES2025 syntax when languageOptions.ecmaVersion is set to 2025 or "latest" (default). Please note that the core rules have not yet been updated to support this syntax.Backslash (\) can now be used as an escape character in files and ignores patterns, regardless of the operating system. Note that only forward slash (/) is interpreted as a path separator in files and ignores patterns, regardless of the operating system.The messages reported by the no-unused-vars rule have been improved to include configured ignore patterns for different kinds of variables.Featurese2b16e2 feat: Implement feature flags (#18516) (Nicholas C. Zakas)8824aa1 feat: add ecmaVersion: 2025, parsing duplicate named capturing groups (#18596) (Milos Djermanovic)Bug Fixes1613e2e fix: Allow escaping characters in config patterns on Windows (#18628) (Milos Djermanovic)21d3766 fix: no-unused-vars include caught errors pattern in
5ヶ月前
記事のアイキャッチ画像
ESLint v9.5.0 released
ESLint Blog
HighlightsThe @eslint/compat package now provides utility for including .gitignore files or any other files with gitignore-style patterns in your eslint.config.js file.Messages about ignored files have been improved to distinguish between files that are ignored because of a matching ignore pattern, files that are ignored because no matching configuration is supplied, and files that are ignored because they are located outside of the base path.The no-sparse-arrays rule now reports precise locations of holes in array literals.Featuresb2d256c feat: no-sparse-arrays report on “comma” instead of the whole array (#18579) (fisker Cheung)Bug Fixes6880286 fix: treat * as a universal pattern (#18586) (Milos Djermanovic)7fbe211 fix: message template for all files ignored (#18564) (Milos Djermanovic)469cb36 fix: Don’t lint the same file multiple times (#18552) (Milos Djermanovic)5cff638 fix: improve message for ignored files without a matching config (#18404) (Francesco Trotta)Documentation455f7fd
5ヶ月前
記事のアイキャッチ画像
ESLint v9.4.0 released
ESLint Blog
HighlightsThe no-loop-func rule no longer reports on IIFE’s.The --inspect-config CLI flag will now launch the latest version of the ESLint Config Inspector.The no-constructor-return rule now allows return statements without a value anywhere in a constructor.Features89a4a0a feat: ignore IIFE’s in the no-loop-func rule (#17528) (Nitin Kumar)Bug Fixesf6534d1 fix: skip processor code blocks that match only universal patterns (#18507) (Milos Djermanovic)7226ebd fix: allow implicit undefined return in no-constructor-return (#18515) (Ali Rezvani)389744b fix: use @eslint/config-inspector@latest (#18483) (唯然)70118a5 fix: func-style false positive with arrow functions and super (#18473) (Milos Djermanovic)Documentationd7ab6f5 docs: update theme when when prefers-color-scheme changes (#18510) (Nitin Kumar)525fdff docs: fix components files (#18519) (Tanuj Kanti)80747d2 docs: refactor prefer-destructuring rule (#18472) (Tanuj Kanti)f06e0b5 docs: clarify func-style (#18477) (Cameron Steffen)Chores0
6ヶ月前
記事のアイキャッチ画像
Introducing the ESLint Configuration Migrator
ESLint Blog
We’ve heard you: One of the biggest reasons ESLint users haven’t upgraded to ESLint v9.x is migrating a configuration file seems difficult and complicated. Some plugins support flat config and the ESLint v9.x rule APIs and some don’t. Sometimes you need to use FlatCompat and sometimes you need to use the compatibility utilities. While we cover as much as we can in the migration guide, it can take time to walk through your configuration and make the necessary changes.That’s why we’re excited to announce the release of the ESLint Configuration Migrator. This utility is designed to translate .eslintrc.* files into eslint.config.js files, including:1-for-1 migration of .eslintrc, .eslintrc.json, .eslintrc.yml, and .eslintrc.yaml files.Reasonable migration of simple .eslintrc.js, .eslintrc.cjs, and .eslintrc.mjs files. (These will often need edits if you are using variables to build your config).Automatic inclusion of .eslintignore patterns into your new config file.Automatic use of FlatCom
6ヶ月前
記事のアイキャッチ画像
ESLint v9.3.0 released
ESLint Blog
HighlightsESLint v9.3.0 adds new options to some rules:func-style has the new option overrides.namedExportsno-extra-boolean-cast has the new option enforceForInnerExpressions superseding the deprecated but still recognized enforceForLogicalOperands optionno-misleading-character-class has the new new option allowEscapeno-restricted-exports has the new option restrictedNamedExportsPatternThe built-in rules line-comment-position and multiline-comment-style have been deprecated in favor of third-party replacements.Featuresb32153c feat: add overrides.namedExports to func-style rule (#18444) (Percy Ma)b67eba4 feat: add restrictedNamedExportsPattern to no-restricted-exports (#18431) (Akul Srivastava)069aa68 feat: add option allowEscape to no-misleading-character-class rule (#18208) (Francesco Trotta)05ef92d feat: deprecate multiline-comment-style & line-comment-position (#18435) (唯然)db0b174 feat: add enforceForInnerExpressions option to no-extra-boolean-cast (#18222) (Kirk Waiblinger)Bug Fixe
6ヶ月前
記事のアイキャッチ画像
Introducing ESLint Compatibility Utilities
ESLint Blog
The release of ESLint v9.0.0 brought with it the rollout of the new configuration system, but also a series of changes to the rules API. These changes are necessary in order to prepare ESLint for implementing language plugins, which will give ESLint the ability to natively lint languages other than JavaScript. As a result, plugin authors needed to update their rules to work with v9.0.0, and unfortunately, that means some of the plugins you rely on may not have been updated yet. That’s why we’re releasing the compatibility utilities.How to know if the compatibility utilities will helpThese utilities may help if you encounter any of the following errors while running ESLint:TypeError: context.getScope is not a functionTypeError: context.getAncestors is not a functionTypeError: context.markVariableAsUsed is not a functionTypeError: context.getDeclaredVariables is not a functionThese errors mean that the plugin rules have not been updated to the latest ESLint rule API.Using the compatibili
6ヶ月前
記事のアイキャッチ画像
ESLint v9.2.0 released
ESLint Blog
HighlightsThe no-case-declarations rule now provides suggestions for some of the problems reported by this rule.Features8485d76 feat: no-case-declarations add suggestions (#18388) (Josh Goldberg ✨)a498f35 feat: update Unicode letter detection in capitalized-comments rule (#18375) (Francesco Trotta)Bug Fixeseeec413 fix: do not throw when defining a global named __defineSetter__ (#18364) (唯然)Documentation0f5df50 docs: Update README (GitHub Actions Bot)1579ce0 docs: update wording regarding indirect eval (#18394) (Kirk Waiblinger)f12a02c docs: update to eslint v9 in custom-rule-tutorial (#18383) (唯然)Choresb346605 chore: upgrade @eslint/[email protected] (#18413) (Milos Djermanovic)c4c18e0 chore: package.json update for @eslint/js release (Jenkins)284722c chore: package.json update for eslint-config-eslint release (Jenkins)347d44f chore: remove eslintrc export from eslint-config-eslint (#18400) (Milos Djermanovic)f316e20 ci: run tests in Node.js 22 (#18393) (Francesco Trotta)
7ヶ月前
記事のアイキャッチ画像
ESLint v9.1.1 released
ESLint Blog
HighlightsFixed an issue that would sometimes cause an outdated version of @eslint/create-config to be used when running npx eslint --init.Bug Fixesa26b402 fix: use @eslint/create-config latest (#18373) (唯然)
7ヶ月前
記事のアイキャッチ画像
ESLint v9.1.0 released
ESLint Blog
HighlightsThis is the first minor release of ESLint following the major release of ESLint v9.0.0 earlier this month.Intl is now recognized as a built-in global unless languageOptions.ecmaVersion is set to 3 or 5.The no-constant-condition rule no longer reports while (true) loops as problems by default.A configuration that contains a non-global ignores pattern list will no longer cause incorrect results when the --no-ignore CLI flag is used, or when the ESLint constructor option ignore is set to false.Features03068f1 feat: Provide helpful error message for nullish configs (#18357) (Nicholas C. Zakas)751b518 feat: replace dependency graphemer with Intl.Segmenter (#18110) (Francesco Trotta)4d11e56 feat: add name to eslint configs (#18289) (唯然)1cbe1f6 feat: allow while(true) in no-constant-condition (#18286) (Tanuj Kanti)0db676f feat: add Intl in es6 globals (#18318) (唯然)Bug Fixes8d18958 fix: Remove name from eslint/js packages (#18368) (Nicholas C. Zakas)594eb0e fix: do not crash on error
7ヶ月前
記事のアイキャッチ画像
ESLint v9.0.0 released
ESLint Blog
HighlightsThis is a summary of the significant changes, both breaking and non-breaking, you need to know about when upgrading from ESLint v8.x to ESLint v9.0.0.InstallingBecause this is a major release, you may not automatically be upgraded by npm. To ensure you are using this version, run:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the breaking changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Node.js < v18.18.0, v19 no longer supportedAs of this post, Node.js v20.x is the LTS release, and as such we are dropping support for all versions of Node.js prior to v18.18.0 as well as v19.x.Flat config is now the default and has some changesFlat config is now the default configuration format for ESLint and eslintrc is officially deprecate
7ヶ月前
記事のアイキャッチ画像
Introducing ESLint Config Inspector
ESLint Blog
As of ESLint v9,0.0, the new configuration system has reached general availability, bringing with it many benefits. Configuration files are now easier to manage and more transparent to compose. However, it can still be non-trivial to understand which rules are enabled and disabled for specific files, especially when your configuration is complex or composed from multiple sources. That’s why we are excited to introduce the ESLint Config Inspector, a visual and interactive tool to help you better understand and inspect your config file.Give it a Try!ESLint Config Inspector is a CLI command that fires up a local web server to visualize your ESLint configuration file from your local filesystem. Give it a try:eslint --inspect-configOr you can run the config inspector without ESLint installed by running the following command in the root directory that contains eslint.config.js file:npx @eslint/config-inspectorVisit http://localhost:7777 in your browser, and you will see a visual representati
7ヶ月前
記事のアイキャッチ画像
ESLint v9.0.0-rc.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the breaking changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Precalculated Code PathsESLint v9.0.0 now precalculates code path information before the traversal used by rules. As a result, the code path information is now complete regardless of where it is accessed inside of a rule.Disallow Unused // fallthrough CommentsIn ESLint v9.0.0-rc.0, the rule no-fallthrough has a new opt
8ヶ月前
記事のアイキャッチ画像
ESLint v9.0.0-beta.2 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the breaking changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Multiple /* eslint */ comments for the same rule are now disallowedIn ESLint v8.x, if the file being linted contained multiple /* eslint */ configuration comments for the same rule, the last one would be applied, while the others would be silently ignored.In ESLint v9.0.0, the first one is applied, while the others a
8ヶ月前
記事のアイキャッチ画像
ESLint v9.0.0-beta.1 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the breaking changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Features74124c2 feat: add suggestions to use-isnan in indexOf & lastIndexOf calls (#18063) (StyleShit)Bug Fixes0cb4914 fix: validate options when comment with just severity enables rule (#18133) (Milos Djermanovic)Documentation5fe095c docs: show v8.57.0 as latest version in dropdown (#18142) (Milos Djermanovic)7db5bb
9ヶ月前
記事のアイキャッチ画像
ESLint v8.57.0 released
ESLint Blog
HighlightsThis release backports from v9.x to v8.x two new features and several bug fixes related to the flat config system to help plugins, integrations and users migrate to flat config ahead of the final v9.0.0 release.Support for eslint.config.mjs and eslint.config.cjsThis release introduces support for eslint.config.mjs and eslint.config.cjs configuration files to v8.x in addition to eslint.config.js, making it easier to use the module format you’d prefer regardless of the module format of the containing package.New API loadESLint()ESLint now exports a new function loadESLint() from its main entry point. Integrations can use this function to get either the FlatESLint class (ESLint class in v9.x) or the ESLint class (LegacyESLint class in v9.x) and thus easily swap between flat config and eslintrc APIs.Features1120b9b feat: Add loadESLint() API method for v8 (#18098) (Nicholas C. Zakas)dca7d0f feat: Enable eslint.config.mjs and eslint.config.cjs (#18066) (Nitin Kumar)Bug Fixes2196d9
9ヶ月前
記事のアイキャッチ画像
ESLint's 2023 year in review
ESLint Blog
The plan for 2023 centered around our first major release since 2021, ESLint v9.0.0. Most of the year was spent preparing for the release, building out the new configuration system (flat config) and communicating the impact to the ecosystem throughout the year.Release of ESLint v9.0.0 and the new configuration systemWhile there are a lot of changes in v9.0.0, the biggest change is making flat config the default configuration system. The old (eslintrc) configuration is still available via an environment variable, and we published the rollout plan outlining how the transition will occur from v8.x through to v10.x.Just before the end of the year, we released ESLint v9.0.0-alpha.0. We anticipate a final v9.0.0 release in the spring of 2024.Other changesDeprecation of formatting rules - in a significant shift from ESLint’s roots, we decided to officially deprecate formatting rulesChanges to rule API - for those who write their own rules, we announced important changes to the rule API that w
9ヶ月前
記事のアイキャッチ画像
ESLint v9.0.0-beta.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the breaking changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.New default values ​​for rule optionsIn v9.0.0, the following rules have new defaults:no-unused-vars: The default value of the caughtErrors option is changed from "none" to "all".no-useless-computed-key: The default value of the enforceForClassMembers option is changed from false to true.Stricter RuleTester validatio
9ヶ月前
記事のアイキャッチ画像
ESLint v9.0.0-alpha.2 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the breaking changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.no-restricted-imports configuration improvementsIn v8.x, if multiple entries in the paths array of your configuration for the no-restricted-imports rule had the same name property, only the last one would apply. In v9.0.0, all entries apply, allowing for specifying different error messages for different imported nam
10ヶ月前
記事のアイキャッチ画像
ESLint v9.0.0-alpha.1 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.no-inner-declarations new default behaviorIn v8.x, no-inner-declarations would flag any functions defined inside of blocks as errors because this behavior was undefined in early versions of JavaScript. As of ES 2015, block-scoped function declarations are well-defined and so we changed the default behavior to not warn on blo
10ヶ月前
記事のアイキャッチ画像
ESLint v9.0.0-alpha.0 released
ESLint Blog
HighlightsThis version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo.Most of the highlights of this release are breaking changes, and are discussed further in the migration guide. There are summaries of the significant changes below. (Less significant changes are included in the migration guide.)This prerelease version of ESLint has a separate documentation section.Node.js < v18.18.0, v19 no longer supportedAs of this post, Node.js v20.x is the LTS release, and as such we are dropping support for all versions of Node.js prior to v18.18.0 as well as v19.x.Flat config is now the default and has some changesFlat config is now the default configuration format for ESLint and eslintrc is officially deprecated. To continue using a eslintrc configuration file, you’ll need to set the ESLINT_USE_FLAT_CONFIG environme
1年前
記事のアイキャッチ画像
ESLint v8.56.0 released
ESLint Blog
HighlightsNew features for reporting unused disable directivesThe ESLint CLI has a new option --report-unused-disable-directives-severity. This option is available in both eslintrc and flat config modes.The linterOptions.reportUnusedDisableDirectives configuration option can now be set to a severity value: "error" (or 2), "warn" (or 1), "off" (or 0). This feature is available only in flat config files (eslint.config.js).Features0dd9704 feat: Support custom severity when reporting unused disable directives (#17212) (Bryan Mishkin)31a7e3f feat: fix no-restricted-properties false negatives with unknown objects (#17818) (Arka Pratim Chaudhuri)Bug Fixes7d5e5f6 fix: TypeError: fs.exists is not a function on read-only file system (#17846) (Francesco Trotta)74739c8 fix: suggestion with invalid syntax in no-promise-executor-return rule (#17812) (Bryan Mishkin)Documentation9007719 docs: update link in ways-to-extend (#17839) (Amel SELMANE)3a22236 docs: Update README (GitHub Actions Bot)54c3ca6 d
1年前
記事のアイキャッチ画像
ESLint v8.55.0 released
ESLint Blog
HighlightsThe no-restricted-imports rule has a new option importNamePattern.Features8c9e6c1 feat: importNamePattern option in no-restricted-imports (#17721) (Tanuj Kanti)Documentation83ece2a docs: fix typo --rules -> --rule (#17806) (OKURA Masafumi)fffca5c docs: remove “Open in Playground” buttons for removed rules (#17791) (Francesco Trotta)a6d9442 docs: fix correct/incorrect examples of rules (#17789) (Tanuj Kanti)383e999 docs: update and fix examples for no-unused-vars (#17788) (Tanuj Kanti)5a8efd5 docs: add specific stylistic rule for each deprecated rule (#17778) (Etienne)Choreseb8950c chore: upgrade @eslint/[email protected] (#17811) (Milos Djermanovic)93df384 chore: package.json update for @eslint/js release (Jenkins)fe4b954 chore: upgrade @eslint/[email protected] (#17799) (Milos Djermanovic)bd8911d ci: pin Node.js 21.2.0 (#17809) (Milos Djermanovic)b29a16b chore: fix several cli tests to run in the intended flat config mode (#17797) (Milos Djermanovic)de165c1 chore: remove unused config-
1年前
記事のアイキャッチ画像
ESLint v8.54.0 released
ESLint Blog
HighlightsThe no-console rule now provides suggestions for some of the problems reported by this rule.Featuresa7a883b feat: for-direction rule add check for condition in reverse order (#17755) (Angelo Annunziata)1452dc9 feat: Add suggestions to no-console (#17680) (Joel Mathew Koshy)21ebf8a feat: update no-array-constructor rule (#17711) (Francesco Trotta)Bug Fixes98926e6 fix: Ensure that extra data is not accidentally stored in the cache file (#17760) (Milos Djermanovic)e8cf9f6 fix: Make dark scroll bar in dark theme (#17753) (Pavel)3cbeaad fix: Use cwd constructor option as config basePath in Linter (#17705) (Milos Djermanovic)Documentationbecfdd3 docs: Make clear when rules are removed (#17728) (Nicholas C. Zakas)05d6e99 docs: update “Submit a Pull Request” page (#17712) (Francesco Trotta)eb2279e docs: display info about deprecated rules (#17749) (Percy Ma)d245326 docs: Correct working in migrating plugin docs (#17722) (Filip Tammergård)Choresd644de9 chore: upgrade @eslint/[email protected]
1年前
記事のアイキャッチ画像
What's coming in ESLint v9.0.0
ESLint Blog
Last month, the Technical Steering Committee (TSC) met to finalize the features for ESLint v9.0.0. This post outlines our plans for v9.0.0. You can keep up to date everything that is planned for v9.0.0 on our project board.Development planDue to the large number of breaking changes planned for v9.0.0, we have decided to develop this release in two phases:Alpha. The alpha release will be comprised primarily of the changes we believe will cause the most disruption for existing users. Getting these changes into a release early will allow us to gather feedback to ensure things are going as planned.Beta. The beta release will be comprised of the remaining tasks and smaller breaking changes that will have fewer impacted users.The specific details about each phase are listed below in this post. Note that if tasks scheduled for the beta are completed in the alpha timeframe, then they will be published in the alpha release.After the beta has been validated, we will publish one or more release c
1年前
記事のアイキャッチ画像
ESLint v8.53.0 released
ESLint Blog
HighlightsCore formatting rules have been deprecated. Please see Deprecation of formatting rules blog post for more details.Features528e1c0 feat: Deprecate formatting rules (#17696) (Nicholas C. Zakas)c0b11dd feat: Add suggestions for no-prototype-builtins (#17677) (Yonathan Randolph)Bug Fixes1ad6257 fix: ensure that exit code for fatal errors is not overwritten (#17683) (Milos Djermanovic)b329ea7 fix: add ; after JSX nodes in no-object-constructor autofix (#17672) (Francesco Trotta)Documentationab8c60d docs: change position of return to top button (#17688) (Tanuj Kanti)4fc44c0 docs: update twitter icon to new X icon (#17687) (Tanuj Kanti)4164b2c docs: Update README (GitHub Actions Bot)8651895 docs: Fix tabs in rule examples (#17653) (Francesco Trotta)3aec1c5 docs: explained rule fixers and suggestions (#17657) (Josh Goldberg ✨)Choresba4d4d5 chore: remove metascraper (#17707) (Milos Djermanovic)0d07338 chore: Update dependencies (#17706) (Milos Djermanovic)93256a3 chore: package.json u
1年前
記事のアイキャッチ画像
Deprecation of formatting rules
ESLint Blog
In ESLint v8.53.0, scheduled to be released on Friday, November 3, 2023, we will formally deprecate our formatting rules. Formatting rules are those rules that simply enforce code conventions around spacing, semicolons, string formats, etc. For a variety of reasons, which are discussed in this post, this is the right decision for ESLint going forward. However, to understand how we got here, it’s helpful to look backward for a moment.BackgroundWhen ESLint was initially released in 2013, the JavaScript ecosystem was embroiled in a debate about whether or not source code formatting should be part of a linter. JSLint, the original JavaScript linter, heavily encoded its author’s formatting preferences into the tool. Those preferences were carried over and loosened a bit in JSLint’s successor, JSHint, but by 2013, JSHint had announced that it was deprecating its formatting options and would be removing them in the next major release. While the options were never removed, they still show this
1年前
記事のアイキャッチ画像
ESLint v8.52.0 released
ESLint Blog
HighlightsUnused eslint-enable directivesThe CLI option --report-unused-disable-directives and the config option reportUnusedDisableDirectives:true now also report and autofix unused eslint-enable directives. An eslint-enable directive is considered unused if it doesn’t match with any eslint-disable directives, meaning that it doesn’t re-enable any rules./* eslint-disable no-console */console.log("hello");/* eslint-enable no-continue -- this directive is unused */Features70648ee feat: report-unused-disable-directive to report unused eslint-enable (#17611) (Yosuke Ota)Bug Fixes5de9637 fix: Ensure shared references in rule configs are separated (#17666) (Nicholas C. Zakas)dcfe573 fix: add preceding semicolon in suggestions of no-object-constructor (#17649) (Francesco Trotta)Documentation476d58a docs: Add note about invalid CLI flags when using flat config. (#17664) (Nicholas C. Zakas)660ed3a docs: Plugin flat config migration guide (#17640) (Nicholas C. Zakas)a58aa20 docs: fix examples f
1年前
記事のアイキャッチ画像
Flat config rollout plans
ESLint Blog
It may seem hard to believe, but the RFC for ESLint’s new configuration system, nicknamed flat config, was first written in 2019. It took until 2022 (v8.21.0) for us to release an experimental, opt-in version of flat config. Since then, we’ve been making changes and improvements based on feedback from the community. The plan was always to allow the current configuration system, nicknamed eslintrc, to exist alongside flat config for a period of time to allow a smooth transition for ESLint users. With flat config now feature complete, we are happy to share the rollout plan.Flat config by default in ESLint v9.0.0When ESLint v9.0.0 is released, either the end of this year or beginning of next year, flat config will be the default configuration system and we will deprecate, but not remove, eslintrc. New features will be added only for flat config, so we encourage everyone to move off of eslintrc as quickly as possible to take advantage of everything v9.0.0 will offer.What this change means
1年前
記事のアイキャッチ画像
ESLint v8.51.0 released
ESLint Blog
HighlightsNew CLI option --no-warn-ignoredThis release includes a new CLI option --no-warn-ignored that, when on, suppresses warnings about ignored files that were explicitly passed in the file list. The new option is available only in the flat config mode.This option is particularly useful when ESLint is run with --max-warnings 0 from tools that pass a list of individual files, such as lint-staged, as it prevents exit code 1 when an ignored file is passed.{ "lint-staged": { "*.js": "eslint --max-warnings 0 --no-warn-ignored" }}APIAs part of this change, FlatESLint constructor has a new option warnIgnored: boolean, default true.The warnIgnored option of FlatESLint#lintText() is still available, but it now defaults to the value of the constructor option. Effectively, its default value is changed from false to true. In order to retain previous behavior, pass warnIgnored: false to FlatESLint#lintText():const eslint = new FlatESLint();await eslint.lintFiles(patterns);await eslint.lintText(
1年前
記事のアイキャッチ画像
Preparing your custom rules for ESLint v9.0.0
ESLint Blog
When ESLint v9.0.0 is released, it will ship with several breaking changes for rule authors. These changes are necessary as part of the work to implement language plugins, which gives ESLint first-class support for linting languages other than JavaScript. We’ve had to make these changes because ESLint has, from the start, assumed that it would only ever be used to lint JavaScript. As such, there wasn’t a lot of thought put into where methods that rules used to interact with source code should live. When revisiting the API for the language plugins work we found that the inconsistencies we were able to live with in a JavaScript-only world will not work in a language-agnostic ESLint core.Automatically update your rulesBefore explaining all of the changes introduced in ESLint v9.0.0, it’s helpful to know that most of the changes described in this post can be automatically made using the eslint-transforms utility. To use the utility, first install it and then run the v9-rule-migration trans
1年前
記事のアイキャッチ画像
ESLint v8.50.0 released
ESLint Blog
HighlightsThe no-new-object rule has been deprecated in favor of the new no-object-constructor rule.The array-callback-return rule has a new option allowVoid.Features27d5a9e feat: add suggestions to array-callback-return (#17590) (Tanuj Kanti)f9082ff feat: flat-rule-tester make sure default config always matches (#17585) (fnx)83914ad feat: Implement SourceCode#applyInlineConfig() (#17351) (Nicholas C. Zakas)22a5582 feat: add rule no-object-constructor, deprecate no-new-object (#17576) (Francesco Trotta)85a3d9e feat: allowVoid option in array-callback-return (#17564) (Tanuj Kanti)Bug Fixescc4d26b fix: Ensure deprecated context.parserServices warns (#17593) (Nicholas C. Zakas)1ea4cfb fix: Ensure all RuleTester tests all deprecated context methods (#17587) (Nicholas C. Zakas)aa1b657 fix: wrong suggestion and message in no-misleading-character-class (#17571) (Yosuke Ota)Documentation1800537 docs: Fix and standardize JSX code examples (#17591) (Francesco Trotta)48a44a7 docs: Add correct/inc
1年前
記事のアイキャッチ画像
ESLint v8.49.0 released
ESLint Blog
HighlightsCode path analysis now provides two new events that can be used in rules: onUnreachableCodePathSegmentStart and onUnreachableCodePathSegmentEnd.CodePath#currentSegments property has been deprecated and will be removed in ESLint v9. If you use this property in your custom rules, please refer to code path analysis usage examples for how to update your code.The lines-between-class-members rule has a new option enforce that allows for more granular configurations.Featuresda09f4e feat: Implement onUnreachableCodePathStart/End (#17511) (Nicholas C. Zakas)32b2327 feat: Emit deprecation warnings in RuleTester (#17527) (Nicholas C. Zakas)acb7df3 feat: add new enforce option to lines-between-class-members (#17462) (Nitin Kumar)Documentationecfb54f docs: Update README (GitHub Actions Bot)de86b3b docs: update no-promise-executor-return examples (#17529) (Nitin Kumar)032c4b1 docs: add typescript template (#17500) (James)cd7da5c docs: Update README (GitHub Actions Bot)Choresb7621c3 chore:
1年前
記事のアイキャッチ画像
ESLint v8.48.0 released
ESLint Blog
HighlightsThe no-promise-executor-return rule has a new option allowVoid.Features1fbb3b0 feat: correct update direction in for-direction (#17483) (Francesco Trotta)d73fbf2 feat: rule tester do not create empty valid or invalid test suites (#17475) (fnx)ee2f718 feat: Allow void in rule no-promise-executor-return (#17282) (nopeless)Bug Fixes7234f6a fix: update RuleTester JSDoc and deprecations (#17496) (Jonas Berlin)Documentation7a51d77 docs: no-param-reassign mention strict mode (#17494) (Stephen Hardy)9cd7ac2 docs: add fetch script to package.json conventions (#17459) (Nitin Kumar)cab21e6 docs: advice for inline disabling of rules (#17458) (Ashish Yadav)056499d docs: fix example of flat config from plugin (#17482) (Francesco Trotta)9e9edf9 docs: update documentation URL in error message (#17465) (Nitin Kumar)Chores8dd3cec chore: upgrade @eslint/[email protected] (#17501) (Milos Djermanovic)6d0496e chore: package.json update for @eslint/js release (ESLint Jenkins)9d4216d chore: Refactor and doc
1年前
記事のアイキャッチ画像
ESLint v8.47.0 released
ESLint Blog
Features53d7508 feat: update regex for methods with thisArg (#17439) (Francesco Trotta)Bug Fixes631648e fix: do not report on shadowed constructors in no-new-wrappers (#17447) (Francesco Trotta)Documentationa766a48 docs: document lack of config file names (#17442) (James)a1635d6 docs: Update README (GitHub Actions Bot)47a0859 docs: update [require-unicode-regexp](/docs/rules/require-unicode-regexp).md as following up #17402 (#17441) (SUZUKI Sosuke)fcdc85d docs: Update README (GitHub Actions Bot)2a92b6c docs: update with “Specifying Parser Options” (#17435) (Cheol-Won)d743ed3 docs: add metadata for parser/processor (#17438) (Huáng Jùnliàng)224376c docs: Update README (GitHub Actions Bot)a41a8e4 docs: update script names in README (#17432) (Nitin Kumar)Choresbf69aa6 chore: Update dependencies (#17456) (Nicholas C. Zakas)0e45760 chore: package.json update for @eslint/js release (ESLint Jenkins)757bfe1 chore: Remove add-to-triage (#17450) (Nicholas C. Zakas)b066640 chore: standardize npm s
1年前
記事のアイキャッチ画像
ESLint v8.46.0 released
ESLint Blog
HighlightsSupport for regular expressions v flagWe have updated ESLint to fully support the ECMAScript 2024 regular expression v flag. This flag allows more complex operations such as difference/subtraction, intersection, and nested character classes. These updates include parsing and ensuring that rules related to regular expressions are behaving as expected.Better error messages for flat configAs we continue to work on flat config, we received some feedback that the error messages were a bit difficult to understand when an eslintrc config was accidentally used. We added more explicit checking for eslintrc-style configs to output more useful error messages that include links to the relevant documentation.Features8a93438 feat: require-unicode-regexp support v flag (#17402) (SUZUKI Sosuke)1a2f966 feat: no-useless-escape support v flag (#17420) (Yosuke Ota)ee68d1d feat: no-empty-character-class support v flag (#17419) (Milos Djermanovic)853d32b feat: deprecate no-return-await (#17417) (C
1年前
記事のアイキャッチ画像
ESLint v8.45.0 released
ESLint Blog
HighlightsHere are some of the important changes in this release.Exporting of new LegacyESLint classAs we continue our transition to the flat config system, we’ve been working with integrators to understand how best to help them transition as well. While we provided the FlatESLint class to allow integrations to start using the flat config system before it’s set to default, we discovered that our original plan (replace ESLint with FlatESLint in v9.0.0) would have left integrations unable to support eslintrc during the transition.To fix this, we added the LegacyESLint class as an export from /use-at-your-own-risk. Both FlatESLint and LegacyESLint will be available through the v9.0.0 lifecycle, allowing integrators to continue to support both config formats. You can use these classes like this:const { FlatESLint, LegacyESLint } = require("eslint/use-at-your-own-risk"); If you are using the ESLint class in your integration, it’s a good idea to switch that to LegacyESLint to make the upgrad
1年前
記事のアイキャッチ画像
ESLint v8.44.0 released
ESLint Blog
HighlightsThe no-extra-parens rule has a new option ternaryOperandBinaryExpressions.eslint.config.js configuration files can now also export a promise that resolves to the configuration array. This can be useful for using ESM dependencies in CommonJS configuration files.The context.parserServices property is now deprecated in favor of SourceCode#parserServices. This change is part of the implementation of language plugins.ESLint’s default parser espree now supports RegExp v flag with set notation + properties of strings ES2024 syntax. Please note that the core rules have not yet been updated to support this syntax.Features1766771 feat: add es2023 and es2024 environments (#17328) (Milos Djermanovic)4c50400 feat: add ecmaVersion: 2024, regexp v flag parsing (#17324) (Milos Djermanovic)4d411e4 feat: add ternaryOperandBinaryExpressions option to no-extra-parens rule (#17270) (Percy Ma)c8b1f4d feat: Move parserServices to SourceCode (#17311) (Milos Djermanovic)ef6e24e feat: treat unknown no
1年前
記事のアイキャッチ画像
ESLint v8.43.0 released
ESLint Blog
HighlightsThe no-irregular-whitespace rule has a new option skipJSXText.The ESLint documentation site now provides a Custom Rule Tutorial with step-by-step instructions on how to create and use a custom rule.Features14581ff feat: directive prologue detection and autofix condition in quotes (#17284) (Francesco Trotta)e50fac3 feat: add declaration loc to message in block-scoped-var (#17252) (Milos Djermanovic)1b7faf0 feat: add skipJSXText option to no-irregular-whitespace rule (#17182) (Azat S)030a827 Revert “feat: docs license (#17010)” (#17231) (唯然)Bug Fixes5338b56 fix: normalize cwd passed to ESLint/FlatESLint constructor (#17277) (Milos Djermanovic)54383e6 fix: Remove no-extra-parens autofix for potential directives (#17022) (Francesco Trotta)Documentation8b855ea docs: resubmit pr17061 doc changes (#17292) (唯然)372722e docs: resubmit pr17012 doc changes (#17293) (唯然)67e7af3 docs: resubmit custom-rules doc changes (#17294) (唯然)9e3d77c docs: Resubmit Fix formatting in Custom Rules docs
1年前
記事のアイキャッチ画像
ESLint v8.42.0 released
ESLint Blog
Featuresb8448ff feat: correct no-useless-return behaviour in try statements (#16996) (Nitin Kumar)Bug Fixesa589636 fix: Config with ignores and without files should not always apply (#17181) (Milos Djermanovic)c4fad17 fix: Correct ignore message for “node_modules” subfolders (#17217) (Francesco Trotta)Documentation01d7142 docs: Update README (GitHub Actions Bot)e5182b7 docs: Update README (GitHub Actions Bot)Chores6ca5b7c chore: upgrade @eslint/[email protected] (#17236) (Milos Djermanovic)67fc5e7 chore: package.json update for @eslint/js release (ESLint Jenkins)0892412 refactor: remove Identifier listener in no-irregular-whitespace (#17235) (Milos Djermanovic)f67d298 test: Add FlatESLint tests with missing config files (#17164) (Milos Djermanovic)5b68d51 chore: Fix fixedsize attribute in code path analysis DOT debug output (#17202) (Milos Djermanovic)37432f2 chore: update descriptions in key-spacing tests (#17195) (Milos Djermanovic)
1年前
記事のアイキャッチ画像
ESLint v8.41.0 released
ESLint Blog
HighlightsIntegrations can now use the new function shouldUseFlatConfig() to determine whether to use the FlatESLint class instead of the ESLint class.The performance of the indent rule has been significantly improved.Features880a431 feat: change default ignore pattern to **/node_modules/ in flat config (#17184) (Milos Djermanovic)8bf5505 feat: expose shouldUseFlatConfig (#17169) (Connor Prussin)Bug Fixes4f5440d fix: incorrect warning message for ignored dotfiles (#17196) (Milos Djermanovic)94da96c fix: unify LintMessage type (#17076) (Brandon Mills)0c415cd fix: validate ignorePatterns constructor option in FlatESLint class (#17139) (Milos Djermanovic)9682d66 fix: switch grapheme-splitter to graphemer (#17160) (fisker Cheung)Documentation7709b14 docs: Update README (GitHub Actions Bot)7f183e0 docs: Update triage process description (#17157) (Nicholas C. Zakas)b68346b docs: fix license to reflect relicensing of jshint (#17165) (Stefan Bischof)Choresf43216a chore: upgrade @eslint/[email protected]
2年前
記事のアイキャッチ画像
ESLint v8.40.0 released
ESLint Blog
HighlightsRules can now use properties context.sourceCode, context.cwd, context.filename, and context.physicalFilename instead of methods context.getSourceCode(), context.getCwd(), context.getFilename(), and context.getPhysicalFilename() respectively. The methods are now considered deprecated.The FlatESLint class has a new method findConfigFile(). It returns the path to the config file being used by the instance or undefined if no config file is being used.The semi rule has a new option omitLastInOneLineClassBody.Features5db7808 feat: improve flat config errors for invalid rule options and severities (#17140) (Josh Goldberg ✨)f5574dc feat: Add findConfigFile() method to FlatESLint (#17142) (Nicholas C. Zakas)e52b98b feat: add sourceCode property to the rule context (#17107) (Nitin Kumar)1468f5b feat: add physicalFilename property to the rule context (#17111) (Nitin Kumar)0df4d4f feat: add cwd to rule context (#17106) (Nitin Kumar)52018f2 feat: add filename property to the rule context
2年前
記事のアイキャッチ画像
ESLint v8.39.0 released
ESLint Blog
HighlightsPerformance of SourceCode methods that search for comments has been improved following recommendations from a blog post by Marvin Hagemeister. For example, our tests showed that this change reduces linting time for eslint-plugin-jsdoc rules by 6~11%.The context.markVariableAsUsed(name) method is now deprecated in favor of SourceCode#markVariableAsUsed(name, node). This change is part of the implementation of language plugins.Features3f7af9f feat: Implement SourceCode#markVariableAsUsed() (#17086) (Nicholas C. Zakas)Documentation6987dc5 docs: Fix formatting in Custom Rules docs (#17097) (Milos Djermanovic)4ee92e5 docs: Update README (GitHub Actions Bot)d8e9887 docs: Custom Rules cleanup/expansion (#16906) (Ben Perlmutter)1fea279 docs: Clarify how to add to tsc agenda (#17084) (Nicholas C. Zakas)970ef1c docs: Update triage board location (Nicholas C. Zakas)6d8bffd docs: Update README (GitHub Actions Bot)Chores60a6f26 chore: upgrade @eslint/[email protected] (#17102) (Milos Djermanovic)
2年前
記事のアイキャッチ画像
ESLint v8.38.0 released
ESLint Blog
HighlightsRules can now use SourceCode#getDeclaredVariables(node) and SourceCode#getAncestors(node) methods. These methods work the same as context.getDeclaredVariables(node) and context.getAncestors() respectively, except that SourceCode#getAncestors isn’t limited to the currently traversed node and the node argument is mandatory. context.getDeclaredVariables and context.getAncestors are now considered deprecated in favor of the SourceCode methods. This change is part of the implementation of language plugins.Featuresa1d561d feat: Move getDeclaredVariables and getAncestors to SourceCode (#17059) (Nicholas C. Zakas)Bug Fixes1c1ece2 fix: do not report on RegExp(...args) in require-unicode-regexp (#17037) (Francesco Trotta)Documentation7162d34 docs: Mention new config system is complete (#17068) (Nicholas C. Zakas)0fd6bb2 docs: Update README (GitHub Actions Bot)c83531c docs: Update/remove external links, eg. point to eslint-community (#17061) (Pelle Wessman)a3aa6f5 docs: Clarify no-div-r
2年前
記事のアイキャッチ画像
ESLint v8.37.0 released
ESLint Blog
HighlightsRules can now use SourceCode#getScope(node) to get the scope of the given node. The node argument is mandatory. This method works the same as context.getScope() but isn’t limited to the currently traversed node. The context.getScope() method is now considered deprecated in favor of SourceCode#getScope(node). This change is part of the implementation of language plugins.Parsers and plugins can now export a meta object with name and version properties to allow for easier debugging and more effective caching. In the new config system, ESLint uses these values when serializing configuration objects (for example, the –print-config CLI option) and when determining whether cached lint results (the --cache CLI option) are still valid. If a parser/plugin provides meta, ESLint can now invalidate caches when a new version of the parser/plugin is installed.In the new config system, languageOptions.parser must now be a parser object. Referencing parsers by "pluginName/parserName" is no lo
2年前
記事のアイキャッチ画像
Announcing the ESLint Community GitHub organization
ESLint Blog
In our2022 year in review,we briefly mentioned a couple of project kickoffs, and we’re excited to nowannounce the officialeslint-community GitHub organization.The strength of ESLint is in its ecosystem, and we continue to investigatedifferent ways of further supporting that community. We began bydonating to community projects,to ensure that high-value projects were receiving the funds they needed tocontinue with ongoing maintenance and development. Our next step is to createthe eslint-community GitHub organization as a home for high-value projects inthe ESLint ecosystem.About the organizationAs you can read in the“eslint-community GitHub organization” RFC,the goal of this new organization is to have a place where community members canhelp ensure widely depended upon ESLint-related packages live and never fall outof maintenance.@aladdin-add,@ota-meshi,@voxpelli and myself@MichaelDeBoey) and all packagemaintainers will make sure these packages stay up-to-date with newer ESLintreleases, a
2年前
記事のアイキャッチ画像
ESLint v8.36.0 released
ESLint Blog
HighlightsThe multiline-comment-style rule has a new option checkJSDoc. This option can only be used when the string option is set to "separate-lines".Featuresc89a485 feat: Add checkJSDoc option to multiline-comment-style (#16807) (Laurent Cozic)f5f5e11 feat: Serialize parsers/processors in flat config (#16944) (Nicholas C. Zakas)4799297 feat: use @eslint-community dependencies (#16784) (Michaël De Boey)Bug Fixes92c1943 fix: correctly iterate files matched by glob patterns (#16831) (Nitin Kumar)Documentationb98fdd4 docs: Update README (GitHub Actions Bot)caf08ce docs: fix estree link in custom formatters docs (#16967) (Milos Djermanovic)3398431 docs: Custom Parsers cleanup/expansion (#16887) (Ben Perlmutter)19d3531 docs: Update README (GitHub Actions Bot)b09a512 docs: detect and fix broken links (#16837) (Nitin Kumar)Chores602b111 chore: upgrade @eslint/[email protected] (#16978) (Milos Djermanovic)43c2345 chore: package.json update for @eslint/js release (ESLint Jenkins)00afb84 chore: upgrade
2年前
記事のアイキャッチ画像
ESLint v8.35.0 released
ESLint Blog
HighlightsESLint’s predefined recommended and all configs are now exported from a new @eslint/js package. Those using "eslint:recommended" or "eslint:all" as strings in the new flat config format should instead install and import @eslint/js and reference predefined configs as js.configs.recommended or js.configs.all.The no-constant-binary-expression rule now catches more cases involving the nullish coalescing operator, ??.A new version of the esquery selector engine includes performance improvements covered in a blog post by Marvin Hagemeister.Features8e34a04 feat: add afterHashbangComment option to lines-around-comment rule (#16920) (SUZUKI Sosuke)c8c0c71 feat: Move all and recommended configs into package. (#16844) (Nicholas C. Zakas)71f6f0d feat: report more cases with ?? in no-constant-binary-expression (#16826) (Daiki Nishikawa)Bug Fixes9698bc5 fix: pin esquery v1.4.0 (fixes #16896) (#16897) (唯然)Documentationf9f195e docs: Plugin docs cleanup & expansion (#16862) (Ben Perlmutter)df
2年前
記事のアイキャッチ画像
ESLint v8.34.0 released
ESLint Blog
HighlightsThe array-callback-return rule now supports Array.prototype.toSorted.Features9b2fcf7 feat: array-callback-return supports Array.prototype.toSorted (#16845) (SUZUKI Sosuke)Bug Fixes923f61d fix: false positive with assignment in no-extra-parens (#16872) (Francesco Trotta)Documentationf0a9883 docs: split rules documentation (#16797) (Ben Perlmutter)67aa37b docs: fix typo in command-line-interface (#16871) (Kevin Rouchut)337f7ed docs: fix width of language input (#16849) (Tanuj Kanti)71349a1 docs: Configure a Parser page (#16803) (Ben Perlmutter)de7e925 docs: remove extra line numbers in example (#16848) (jonz94)ad38d77 docs: Update README (GitHub Actions Bot)Chores9dbe06d chore: add type property to array-element-newline schema (#16877) (MHO)a061527 chore: Remove unused functions (#16868) (Nicholas C. Zakas)
2年前
記事のアイキャッチ画像
ESLint v8.33.0 released
ESLint Blog
HighlightsThe no-restricted-exports rule gained a new restrictDefaultExports option to control where the default export can be used.This release continues our ongoing documentation update project. All moved pages should redirect to their new locations, but please let us know if you find any broken links.Features2cc7954 feat: add restrictDefaultExports option to no-restricted-exports rule (#16785) (Nitin Kumar)Documentation17f4be2 docs: Fix examples in no-multiple-empty-lines rule (#16835) (jonz94)9c7cfe3 docs: ‘Source Code’ content in ‘Set up Development Environment’ page (#16780) (Ben Perlmutter)ede5c64 docs: Custom processors page (#16802) (Ben Perlmutter)2620614 docs: Code of Conduct page (#16781) (Ben Perlmutter)50a8efd docs: report a sec vulnerability page (#16808) (Ben Perlmutter)ed60afd docs: Update page titles, section landing pages, and side TOC (#16760) (Ben Perlmutter)333c712 docs: add background to code-path-diagrams for dark-mode (#16822) (Tanuj Kanti)f5f7b9b docs: Update
2年前
記事のアイキャッチ画像
ESLint v8.32.0 released
ESLint Blog
HighlightsThe prefer-regex-literals rule now provides suggestions for some of the problems it reports.This release reorganizes documentation as part of our ongoing documentation update project. All moved pages should redirect to their new locations, but please let us know if you find any broken links.Featuresfc20f24 feat: add suggestions for redundant wrapping in prefer-regex-literals (#16658) (YeonJuan)Bug Fixesb4f8329 fix: ignore directives for no-fallthrough (#16757) (gfyoung)Documentation17b65ad docs: IA Update page URL move (#16665) (Ben Perlmutter)5981296 docs: fix theme switcher button (#16752) (Sam Chen)6669413 docs: deploy prerelease docs under the /docs/next/ path (#16541) (Nitin Kumar)78ecfe0 docs: use inline code for rule options name (#16768) (Percy Ma)fc2ea59 docs: Update README (GitHub Actions Bot)762a872 docs: Update README (GitHub Actions Bot)Chores2952d6e chore: sync templates/*.md files with issue templates (#16758) (gfyoung)3e34418 chore: Add new issues to triage pr
2年前
記事のアイキャッチ画像
ESLint's 2022 year in review
ESLint Blog
In February 2022, we shared our plan for 2022, including how the ESLint project as a whole would be spending its sponsorship money for the betterment of the project. In this post, I’ll share what we achieved during the year.Website redesignThe most recognizable change to the project was undoubtedly the website redesign. The new website was officially launched on June 23 and was immediately met with widespread positive reviews. The designer, Hayden Bleasel, shared his approach for the redesign in a guest post on the newly redesigned website.We also launched several international language sites, including Chinese, Spanish, German, Japanese, Brazilian Portuguese, French, and Hindi.The website launch excited a lot of people to the point where we started getting contributions just for the website. As a result, we created a new website team to focus on keeping the new website up-to-date and continuing to make improvements.This effort cost nearly $60,000 and would not have been possible witho
2年前
記事のアイキャッチ画像
ESLint v8.31.0 released
ESLint Blog
HighlightsThe no-underscore-dangle rule gained two new options: allowInArrayDestructuring and allowInObjectDestructuring. Both of these default to true to allow dangling underscores in array and object destructuring for backwards compatibility. Set them to false to check for dangling underscores in destructuring assignments.Features52c7c73 feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)b401cde feat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)30d0daf feat: group properties with values in parentheses in key-spacing (#16677) (Francesco Trotta)Bug Fixes35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722) (Francesco Trotta)87b2470 fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)Documentation4339dc4 docs: Update README (GitHub Actions Bot)4e4049c docs: optimize code block structure (#16669) (Sam Chen)54a7ade docs: do not escape code blocks of
2年前
記事のアイキャッチ画像
ESLint v8.30.0 released
ESLint Blog
HighlightsThe no-return-await rule now provides suggestions for some of the problems reported by this rule.Features075ef2c feat: add suggestion for no-return-await (#16637) (Daniel Bartholomae)7190d98 feat: update globals (#16654) (Sébastien Règne)Bug Fixes1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#16579) (Nicholas C. Zakas)9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic)Documentation6a8cd94 docs: Clarify Discord info in issue template config (#16663) (Nicholas C. Zakas)ad44344 docs: CLI documentation standardization (#16563) (Ben Perlmutter)293573e docs: fix broken line numbers (#16606) (Sam Chen)fa2c64b docs: use relative links for internal links (#16631) (Percy Ma)75276c9 docs: reorder options in no-unused-vars (#16625) (Milos Djermanovic)7276fe5 docs: Fix anchor in URL (#16628) (Karl Horky)6bef135 docs: don’t apply layouts to html formatter example (#16591) (Tanuj Kanti)dfc7ec1 docs: Formatters page updates (#16566) (B
2年前
記事のアイキャッチ画像
ESLint v8.29.0 released
ESLint Blog
HighlightsThe no-extra-parens rule has a new option allowParensAfterCommentPattern.The prefer-named-capture-group rule now provides suggestions for some of the problems reported by this rule.Features49a07c5 feat: add allowParensAfterCommentPattern option to no-extra-parens (#16561) (Nitin Kumar)e6a865d feat: prefer-named-capture-group add suggestions (#16544) (Josh Goldberg)a91332b feat: In no-invalid-regexp validate flags also for non-literal patterns (#16583) (trosos)Documentation0311d81 docs: Configuring Plugins page intro, page tweaks, and rename (#16534) (Ben Perlmutter)57089b1 docs: add a property assignment example for camelcase rule (#16605) (Milos Djermanovic)b6ab030 docs: add docs codeowners (#16601) (Strek)6380c87 docs: fix sitemap and feed (#16592) (Milos Djermanovic)ade621d docs: perf debounce the search query (#16586) (Shanmughapriyan S)fbcf3ab docs: fix searchbar clear button (#16585) (Shanmughapriyan S)f894035 docs: HTTPS link to yeoman.io (#16582) (Christian Oliff)de12
2年前
記事のアイキャッチ画像
ESLint v8.28.0 released
ESLint Blog
HighlightsThe no-magic-numbers rule has a new option ignoreClassFieldInitialValues.Features63bce44 feat: add ignoreClassFieldInitialValues option to no-magic-numbers (#16539) (Milos Djermanovic)8385ecd feat: multiline properties in rule key-spacing with option align (#16532) (Francesco Trotta)a4e89db feat: no-obj-calls support Intl (#16543) (Sosuke Suzuki)Bug Fixesc50ae4f fix: Ensure that dot files are found with globs. (#16550) (Nicholas C. Zakas)9432b67 fix: throw error for first unmatched pattern (#16533) (Milos Djermanovic)e76c382 fix: allow * 1 when followed by / in no-implicit-coercion (#16522) (Milos Djermanovic)Documentation34c05a7 docs: Language Options page intro and tweaks (#16511) (Ben Perlmutter)3e66387 docs: add intro and edit ignoring files page (#16510) (Ben Perlmutter)436f712 docs: fix Header UI inconsistency (#16464) (Tanuj Kanti)f743816 docs: switch to wrench emoji for auto-fixable rules (#16545) (Bryan Mishkin)bc0547e docs: improve styles for versions and languages
2年前
記事のアイキャッチ画像
ESLint v8.27.0 released
ESLint Blog
HighlightsThe new no-new-native-nonconstructor rule protects against newing BigInts and Symbols, which would throw an error. The existing no-new-symbol rule only checks for new Symbol. no-new-native-nonconstructor will take the place of no-new-symbol in eslint:recommended in the next major release.The new no-empty-static-block rule disallows empty ES2022 class static initialization blocks.Featuresf14587c feat: new no-new-native-nonconstructor rule (#16368) (Sosuke Suzuki)978799b feat: add new rule no-empty-static-block (#16325) (Sosuke Suzuki)69216ee feat: no-empty suggest to add comment in empty BlockStatement (#16470) (Nitin Kumar)319f0a5 feat: use context.languageOptions.ecmaVersion in core rules (#16458) (Milos Djermanovic)Bug Fixesc3ce521 fix: Ensure unmatched glob patterns throw an error (#16462) (Nicholas C. Zakas)886a038 fix: handle files with unspecified path in getRulesMetaForResults (#16437) (Francesco Trotta)Documentationce93b42 docs: Stylelint property-no-unknown (#16497)
2年前
記事のアイキャッチ画像
ESLint v8.26.0 released
ESLint Blog
HighlightsThe no-implicit-globals rule now supports /* exported */ directive comments.ESLINT_USE_FLAT_CONFIG environment variable can now be used for more control over switching between the current and the new config system.The @eslint/create-config utility to create ESLint config files has a new option --config:# npm 6.xnpm init @eslint/config --config semistandard# npm 7+npm init @eslint/config -- --config semistandardFeatures4715787 feat: check Object.create() in getter-return (#16420) (Yuki Hirasawa)28d1902 feat: no-implicit-globals supports exported block comment (#16343) (Sosuke Suzuki)e940be7 feat: Use ESLINT_USE_FLAT_CONFIG environment variable for flat config (#16356) (Tomer Aberbach)dd0c58f feat: Swap out Globby for custom globbing solution. (#16369) (Nicholas C. Zakas)Bug Fixesdf77409 fix: use baseConfig constructor option in FlatESLint (#16432) (Milos Djermanovic)33668ee fix: Ensure that glob patterns are matched correctly. (#16449) (Nicholas C. Zakas)740b208 fix: ignore me
2年前
記事のアイキャッチ画像
ESLint use at Cesium through years of a changing ecosystem
ESLint Blog
BackgroundCesiumJS is an open source JavaScript library for 3D geospatial visualization. Cesium’s roots are in aerospace with our first use case being accurate visualization of satellites and spacecraft. Now with more than 4,000,000 downloads and 9000 stars on GitHub, CesiumJS has a large community of users and contributors. Users from all over the world have used CesiumJS for a variety of different applications, from mapping and data analysis to building interactive simulations for satellites, event planning, open source intelligence and even for building flight simulators.Switching to ESLintAs an open source project with frequent external contributions, it is important that we have clear and consistent coding conventions along with automated ways of enforcing them. Development started in 2011, and the first version of Cesium was released in 2014. As new browser APIs and standards have emerged, ensuring that CesiumJS stays compatible with modern use cases has been very important to us
2年前
記事のアイキャッチ画像
ESLint v8.25.0 released
ESLint Blog
HighlightsFormatters now have access to the --max-warnings threshold when it is exceeded. See Working with Custom Formatters - The context Argument for details.The new config system no longer supports .eslintignore files, --ignore-path CLI option and ignorePath API option, due to observed incompatibilities with ignores in eslint.config.js configuration files. For ignoring files in the new config system, please see Globally ignoring files with ignores. We are still working on several other issues related to this feature.Features173e820 feat: Pass --max-warnings value to formatters (#16348) (Brandon Mills)6964cb1 feat: remove support for ignore files in FlatESLint (#16355) (Milos Djermanovic)1cc4b3a feat: id-length counts graphemes instead of code units (#16321) (Sosuke Suzuki)Documentation90c6028 docs: Conflicting fixes (#16366) (Ben Perlmutter)5a3fe70 docs: Add VS to integrations page (#16381) (Maria José Solano)49bd1e5 docs: remove unused link definitions (#16376) (Nick Schonning)3bd3
2年前
記事のアイキャッチ画像
ESLint v8.24.0 released
ESLint Blog
HighlightsOne new rule has been added: logical-assignment-operatorsFeatures1729f9e feat: account for sourceType: "commonjs" in the strict rule (#16308) (Milos Djermanovic)b0d72c9 feat: add rule logical-assignment-operators (#16102) (fnx)f02bcd9 feat: array-callback-return support findLast and findLastIndex (#16314) (Sosuke Suzuki)Documentation2c152ff docs: note false positive Object.getOwnPropertyNames in prefer-reflect (#16317) (AnnAngela)bf7bd88 docs: fix warn severity description for new config files (#16324) (Nitin Kumar)8cc0bbe docs: use more clean link syntax (#16309) (Percy Ma)6ba269e docs: fix typo (#16288) (jjangga0214)Chores131e646 chore: Upgrade @humanwhocodes/config-array for perf (#16339) (Nicholas C. Zakas)504fe59 perf: switch from object spread to Object.assign when merging globals (#16311) (Milos Djermanovic)
2年前
記事のアイキャッチ画像
ESLint v8.23.1 released
ESLint Blog
HighlightsThis release includes a significant performance improvement in the indent rule as well as some bug fixes for the new eslint.config.js config system.Bug Fixesb719893 fix: Upgrade eslintrc to stop redefining plugins (#16297) (Brandon Mills)734b54e fix: improve autofix for the prefer-const rule (#16292) (Nitin Kumar)6a923ff fix: Ensure that glob patterns are normalized (#16287) (Nicholas C. Zakas)c6900f8 fix: Ensure globbing doesn’t include subdirectories (#16272) (Nicholas C. Zakas)Documentation16cba3f docs: fix mobile double tap issue (#16293) (Sam Chen)e098b5f docs: keyboard control to search results (#16222) (Shanmughapriyan S)1b5b2a7 docs: add Consolas font and prioritize resource loading (#16225) (Amaresh S M)1ae8236 docs: copy & use main package version in docs on release (#16252) (Jugal Thakkar)279f0af docs: Improve id-denylist documentation (#16223) (Mert Ciflikli)Chores38e8171 perf: migrate rbTree to js-sdsl (#16267) (Zilong Yao)1c388fb chore: switch nyc to c8 (#16263)
2年前
記事のアイキャッチ画像
ESLint v8.23.0 released
ESLint Blog
HighlightsThe new config system is now incorporated into the CLI, along with the existing config system. To opt-in to the new config system, place a eslint.config.js file in the root of your project. Please note that this is still an experimental feature and we welcome your feedback!The no-fallthrough rule has a new option allowEmptyCase.The no-warning-comments rule has a new option decoration.Features3e5839e feat: Enable eslint.config.js lookup from CLI (#16235) (Nicholas C. Zakas)30b1a2d feat: add allowEmptyCase option to no-fallthrough rule (#15887) (Amaresh S M)43f03aa feat: no-warning-comments support comments with decoration (#16120) (Lachlan Hunt)Documentationb1918da docs: package.json conventions (#16206) (Patrick McElhaney)0e03c33 docs: remove word immediately (#16217) (Strek)c6790db docs: add anchor link for “migrating from jscs” (#16207) (Percy Ma)7137344 docs: auto-generation edit link (#16213) (Percy Ma)Chores2e004ab chore: upgrade @eslint/[email protected] (#16249) (Milos Dj
2年前
記事のアイキャッチ画像
ESLint v8.22.0 released
ESLint Blog
HighlightsThe new config system preview now supports caching. To learn more, check out the three-part series on our blog! (1, 2, 3)Features2b97607 feat: Implement caching for FlatESLint (#16190) (Nicholas C. Zakas)fd5d3d3 feat: add methodsIgnorePattern option to object-shorthand rule (#16185) (Milos Djermanovic)Documentation9f5a752 docs: optimize image assets (#16170) (Sam Chen)61b2948 docs: add svgo command to pre commit hook (#16178) (Amaresh S M)784096d docs: improve search result UI (#16187) (Sam Chen)d0f4cb4 docs: use shorthand property name in example (#16180) (Kevin Elliott)Chores10a6e0e chore: remove deploy workflow for playground (#16186) (Milos Djermanovic)
2年前
記事のアイキャッチ画像
Redesigning ESLint
ESLint Blog
Hi! My name’s Hayden. I’m a designer and developer and, until recently, I ran a little agency called Jellypepper.We were fortunate enough to work with the ESLint team on their new brand and website. I’m a huge fan of ESLint and use it every day, even going to the effort of writing my own 600-line ESLint config to use across all my React, Next.js and Expo projects.Nicholas originally reached out to us on Twitter to kick off the largest project the ESLint team has taken on in its nine years of existence. He wanted to create a stronger brand identity for the ESLint team and its community, and make the website more functional, easier to navigate, and more useful to everyone from new users to established users.Hi Hayden, I wanted to say thanks for the donation to ESLint. As it so happens, the project is looking for a bit of a rebrand (keep the logo, change everything else) and website redesign, so I was wondering if you’d be interested. It just seemed like a potentially good match.This was
2年前
記事のアイキャッチ画像
ESLint's new config system, Part 3: Developer preview
ESLint Blog
In my previous post, I explained the fundamental concepts of using the new “flat” config system. The new config system isn’t yet tied into the CLI while we do more internal testing, but we did want to give the ESLint community a chance to experiment with flat config while we work on incorporating it into the CLI. So ESLint v8.21.0 incorporates several ways to try out flat config as we work on it. Please keep in mind that everything mentioned in this post is experimental and we would love your feedback as you try it out.Using flat config with the Linter classIf you are currently using Linter from the eslint package, you can enable flat config by setting configType: "flat" as an option on the constructor. Here’s an example:const linter = new Linter({ configType: "flat" });const messages = linter.verify("new Map()", { languageOptions: { ecmaVersion: 5, sourceType: "script" }, rules: { "no-undef": "error" }}, "filename.js");When you pass configType: "flat" as an option, Linter expects that
2年前
記事のアイキャッチ画像
ESLint's new config system, Part 2: Introduction to flat config
ESLint Blog
In my previous post, I talked about how the eslintrc config system had grown to be more complex than necessary through a series of small, incremental changes. The flat config system, on the other hand, was designed from the start to be simpler in a number of ways. We took all of the learnings from the previous six years of ESLint development to come up with a holistic approach to configuration that took the best of eslintrc and combined it with the way other JavaScript-related tools handled configuration. The result is something that hopefully feels familiar to existing ESLint users and is far more powerful than what was possible before.Docs: Read more about flat config system in the official documentation.The goals of flat configTo set the stage for the changes in flat config, we had several goals:Logical defaults - the way people write JavaScript has changed a lot in the past nine years, and we wanted the new config system to reflect our current reality rather than the one we lived i
2年前
記事のアイキャッチ画像
ESLint's new config system, Part 1: Background
ESLint Blog
When ESLint was first released in 2013, the config system was fairly simple. You could define the rules you wanted to enable or disable in a .eslintrc file. When a file was linted, ESLint would first look in the same directory as that file for a .eslintrc file and then continue up the directory hierarchy until reaching the root, merging configurations from all the .eslintrc files found along the way. This system, which we called the configuration cascade, allowed you to easily override rules for particular directories, something that JSHint wasn’t capable of doing. You could also add more configuration in the eslintConfig key inside of package.json.Over the years, however, the config system grew into an unwieldy mess. That’s why in 2019 I proposed creating a new config system to make it easier to configure ESLint in a world where JavaScript projects are growing increasingly complex. A significant portion of the new config system has been merged into the main branch, and so it’s time to
2年前
記事のアイキャッチ画像
ESLint v8.21.0 released
ESLint Blog
HighlightsESLint will now print deprecation warnings for two changes that are coming in ESLint v9: First, rules with options must specify schemas. Second, rules must be defined using the object-style format that has been available since ESLint v2 rather than the legacy function-style format. See RFC85 for full details.We took a big step toward ESLint’s new config system! The new FlatESLint class is now merged. Its API is not yet stable, and not all features are implemented yet, but it is accessible via the Node.js API for early testing. See RFC9 for the original design.Features7b43ea1 feat: Implement FlatESLint (#16149) (Nicholas C. Zakas)92bf49a feat: improve the key width calculation in key-spacing rule (#16154) (Nitin Kumar)c461542 feat: add new allowLineSeparatedGroups option to the sort-keys rule (#16138) (Nitin Kumar)1cdcbca feat: add deprecation warnings for legacy API in RuleTester (#16063) (Nitin Kumar)Bug Fixes0396775 fix: lines-around-comment apply allowBlockStart for switch
2年前
記事のアイキャッチ画像
ESLint v8.20.0 released
ESLint Blog
HighlightsESLint now catches exceptions thrown by preprocessors and reports them as lint errors. This matches how ESLint already handled parser errors. Previously, exceptions thrown by preprocessors would crash ESLint.Featuresca83178 feat: catch preprocess errors (#16105) (JounQin)Bug Fixes30be0ed fix: no-warning-comments rule escapes special RegEx characters in terms (#16090) (Lachlan Hunt)bfe5e88 fix: ignore spacing before ] and } in comma-spacing (#16113) (Milos Djermanovic)Documentation845c4f4 docs: Add website team details (#16115) (Nicholas C. Zakas)5a0dfdb docs: Link to blog post in no-constant-binary-expression (#16112) (Jordan Eldredge)bc692a9 docs: remove install command (#16084) (Strek)49ca3f0 docs: don’t show toc when content not found (#16095) (Amaresh S M)ba19e3f docs: enhance 404 page UI (#16097) (Amaresh S M)a75d3b4 docs: remove unused meta.docs.category field in working-with-rules page (#16109) (Brandon Scott)cdc0206 docs: add formatters page edit link (#16094) (Amares
2年前
記事のアイキャッチ画像
Interesting bugs caught by no-constant-binary-expression
ESLint Blog
In ESLint v8.14.0 I contributed a new core rule called no-constant-binary-expression which has surprised me with the wide variety of subtle and interesting bugs it has been able to detect.In this post I’ll explain what the rule does and share some examples of real bugs it has detected in popular open source projects such as Material UI, Webpack, VS Code, and Firefox as well as a few interesting bugs that it found internally at Meta. I hope these examples will convince you to try enabling the rule in the projects you work on!What does no-constant-binary-expression do?The rule checks for comparisons (==, !==, etc) where the outcome cannot vary at runtime, and logical expressions (&&, ??, ||) which will either always or never short-circuit.For example:+x == null will always be false, because + will coerce x into a number, and a number is never nullish.{ ...foo } || DEFAULT will never return DEFAULT because objects are always truthy.Both of these are examples of expressions that look like
2年前
記事のアイキャッチ画像
ESLint v8.19.0 released
ESLint Blog
HighlightsThe no-restricted-imports rule now supports the importNames option for more granular control of imports when matching modules with patterns.Features7023628 feat: add importNames support for patterns in no-restricted-imports (#16059) (Brandon Scott)472c368 feat: fix handling of blockless with statements in indent rule (#16068) (Milos Djermanovic)Bug Fixesfc81848 fix: throw helpful exception when rule has wrong return type (#16075) (Bryan Mishkin)Documentation3ae0574 docs: Remove duplicate rule descriptions (#16052) (Amaresh S M)f50cf43 docs: Add base href to each page to fix relative URLs (#16046) (Nicholas C. Zakas)ae4b449 docs: make logo link clickable on small width screens (#16058) (Milos Djermanovic)280f898 docs: use only fenced code blocks (#16044) (Milos Djermanovic)f5d63b9 docs: add listener only if element exists (#16045) (Amaresh S M)8b639cc docs: add missing migrating-to-8.0.0 in the user guide (#16048) (唯然)b8e68c1 docs: Update release process (#16036) (Nicholas C.
2年前
記事のアイキャッチ画像
ESLint v8.18.0 released
ESLint Blog
HighlightsPer-rule performance report now includes time spent in create() of rules. This time is added to the time spent in the listeners.Featuresa6273b8 feat: account for rule creation time in performance reports (#15982) (Nitin Kumar)Bug Fixesf364d47 fix: Make no-unused-vars treat for…of loops same as for…in loops (#15868) (Alex Bass)Documentation4871047 docs: Update analytics, canonical URL, ads (#15996) (Nicholas C. Zakas)cddad14 docs: Add correct/incorrect containers (#15998) (Nicholas C. Zakas)b04bc6f docs: Add rules meta info to rule pages (#15902) (Nicholas C. Zakas)1324f10 docs: unify the wording referring to optional exception (#15893) (Abdelrahman Elkady)ad54d02 docs: add missing trailing slash to some internal links (#15991) (Milos Djermanovic)df7768e docs: Switch to version-relative URLs (#15978) (Nicholas C. Zakas)21d6479 docs: change some absolute links to relative (#15970) (Milos Djermanovic)f31216a docs: Update README team and sponsors (ESLint Jenkins)Build Relateded49
2年前
記事のアイキャッチ画像
ESLint v8.17.0 released
ESLint Blog
HighlightsThe no-use-before-define rule has a new option allowNamedExports.Features55319e1 feat: fix indent bug with semicolon-first style (#15951) (Milos Djermanovic)f6d7920 feat: add allowNamedExports option to no-use-before-define (#15953) (Milos Djermanovic)Bug Fixes54c0953 fix: cleanup typos (#15939) (Nick Schonning)845a7af fix: typo ocatal -> octal (#15940) (Nick Schonning)Documentationb915018 docs: Update website UI to latest (#15944) (Nicholas C. Zakas)f0bb609 docs: Update Exponentiation operator MDN link (#15960) (Pranjal Jain)baa0153 docs: Use correct past tense “left” instead of “leaved” (#15950) (Frederik Braun)1351a9b docs: Add Resources section to rule pages (#15901) (Nicholas C. Zakas)68cf0fb docs: cleanup typos (#15936) (Nick Schonning)13b62ae docs: use-dart-sass instead of node-sass (#15912) (Deepshika S)c81c5d6 docs: add social media links (#15920) (Deepshika S)0d6a50b docs: fix openjs link (#15917) (Amaresh S M)54910f5 docs: display version in mobile view (#15909) (A
2年前
記事のアイキャッチ画像
ESLint v8.16.0 released
ESLint Blog
HighlightsThe no-misleading-character-class rule now provides suggestions for some of the problems reported by this rule.Featurescab0c22 feat: add Unicode flag suggestion in no-misleading-character-class (#15867) (Milos Djermanovic)38ae956 feat: check Unicode code point escapes in no-control-regex (#15862) (Milos Djermanovic)ee69cd3 feat: Update global variables (#15871) (Sébastien Règne)Bug Fixes3f09aab fix: function-paren-newline crash on “new new Foo();” (#15850) (coderaiser)Documentation050d5f4 docs: Static further reading links (#15890) (Nicholas C. Zakas)36287c0 docs: fix absolute paths in related rules shortcode to work from /docs (#15892) (Milos Djermanovic)90b6990 docs: fix absolute links in rule macro to work from /docs (#15891) (Milos Djermanovic)f437249 docs: Adjust docs site path prefix (#15889) (Nicholas C. Zakas)6e16025 docs: update ‘Related Rules’ and ‘Further Reading’ in remaining rules (#15884) (Milos Djermanovic)1d39f69 docs: remove confusing examples for no-mixed-op
2年前
記事のアイキャッチ画像
ESLint v8.15.0 released
ESLint Blog
HighlightsThe no-underscore-dangle rule has a new option enforceInClassFields.Featuresab37d3b feat: add enforceInClassFields option to no-underscore-dangle (#15818) (Roberto Cestari)Bug Fixes8bf9440 fix: “use strict” should not trigger strict mode in ES3 (#15846) (Milos Djermanovic)Documentation28116cc docs: update AST node names link in no-restricted-syntax (#15843) (Milos Djermanovic)272965f docs: fix h1 heading on formatters page (#15834) (Milos Djermanovic)a798166 docs: update example for running individual rule tests (#15833) (Milos Djermanovic)57e732b docs: mark SourceCode#getJSDocComment deprecated in working-with-rules (#15829) (Milos Djermanovic)9a90abf docs: update docs directory in working-with-rules (#15830) (Milos Djermanovic)810adda docs: add more examples for prefer-object-spread (#15831) (coderaiser)06b1edb docs: clarify no-control-regex rule (#15808) (Milos Djermanovic)9ecd42f docs: Fixed typo in code comment (#15812) (Addison G)de992b7 docs: remove links to 2fa docume
3年前
記事のアイキャッチ画像
ESLint v8.14.0 released
ESLint Blog
HighlightsOne new rule has been added: no-constant-binary-expressionFeaturesab6363d feat: Add rule no-constant-binary-expression (#15296) (Jordan Eldredge)Bug Fixes35fa1dd fix: allow project paths to have URL-encoded characters (#15795) (Milos Djermanovic)413f1d5 fix: update astUtils.isDirectiveComment with globals and exported (#15775) (Milos Djermanovic)Build Relatedc2407e8 build: add node v18 (#15791) (唯然)Chores735458c chore: add static frontmatter to no-constant-binary-expression docs (#15798) (Milos Djermanovic)db28f2c chore: Add static frontmatter to docs (#15782) (Nicholas C. Zakas)3bca59e chore: markdownlint autofix on commit (#15783) (Nicholas C. Zakas)
3年前
記事のアイキャッチ画像
ESLint v8.13.0 released
ESLint Blog
Features274acbd feat: fix no-eval logic for this in arrow functions (#15755) (Milos Djermanovic)Bug Fixes97b57ae fix: invalid operator in operator-assignment messages (#15759) (Milos Djermanovic)Documentationc32482e docs: Typo in space-infix-ops docs (#15754) (kmin-jeong)f2c2d35 docs: disambiguate types FormatterFunction and LoadedFormatter (#15727) (Francesco Trotta)Choresbb4c0d5 chore: Refactor docs to work with docs.eslint.org (#15744) (Nicholas C. Zakas)d36f12f chore: remove lib/init from eslint config (#15748) (Milos Djermanovic)a59a4e6 chore: replace trimLeft/trimRight with trimStart/trimEnd (#15750) (Milos Djermanovic)
3年前
記事のアイキャッチ画像
ESLint v8.12.0 released
ESLint Blog
Features685a67a feat: fix logic for top-level this in no-invalid-this and no-eval (#15712) (Milos Djermanovic)Chores18f5e05 chore: padding-line-between-statements remove useless additionalItems (#15706) (Martin Sadovy)
3年前
記事のアイキャッチ画像
ESLint v8.11.0 released
ESLint Blog
HighlightsThe no-unused-vars rule has a new destructuredArrayIgnorePattern option.Features800bd25 feat: add destructuredArrayIgnorePattern option in no-unused-vars (#15649) (Nitin Kumar)8933fe7 feat: Catch undefined and Boolean() in no-constant-condition (#15613) (Jordan Eldredge)f90fd9d feat: Add ESLint favicon to the HTML report document (#15671) (Mahdi Hosseinzadeh)57b8a57 feat: valid-typeof always ban undefined (#15635) (Zzzen)Bug Fixes6814922 fix: escaping for square brackets in ignore patterns (#15666) (Milos Djermanovic)c178ce7 fix: extend the autofix range in comma-dangle to ensure the last element (#15669) (Milos Djermanovic)Documentationc481cec docs: add fast-eslint-8 to atom integrations (userguide) (#15695) (db developer)d2255db docs: Add clarification about eslint-enable (#15680) (dosisod)8b9433c docs: add object pattern to first section of computed-property-spacing (#15679) (Milos Djermanovic)de800c3 docs: link to minimatch docs added. (#15688) (Gaurav Tewari)8f675b1 docs
3年前
記事のアイキャッチ画像
ESLint v8.10.0 released
ESLint Blog
HighlightsThe no-shadow rule has a new ignoreOnInitialization option.The no-confusing-arrow rule has a new onlyOneSimpleParam option.Features6e2c325 feat: Add ignoreOnInitialization option to no-shadow rule (#14963) (Soufiane Boutahlil)115cae5 feat: --debug prints time it takes to parse a file (#15609) (Bartek Iwańczuk)345e70d feat: Add onlyOneSimpleParam option to no-confusing-arrow rule (#15566) (Gautam Arora)Bug Fixescdc5802 fix: Avoid __dirname for built-in configs (#15616) (DoZerg)ee7c5d1 fix: false positive in camelcase with combined properties (#15581) (Nitin Kumar)Documentation1005bd5 docs: update CLA information (#15630) (Nitin Kumar)5d65c3b docs: Fix typo in no-irregular-whitespace (#15634) (Ryota Sekiya)b93af98 docs: add links between rules about whitespace around block curly braces (#15625) (Milos Djermanovic)ebc0460 docs: update babel links (#15624) (Milos Djermanovic)Chores7cec74e chore: upgrade @eslint/[email protected] (#15648) (Milos Djermanovic)11c8580 chore: read ESLINT
3年前
記事のアイキャッチ画像
Paying contributors, sponsoring projects, and more: ESLint's 2022 spending plan
ESLint Blog
In our last update on paying contributors, we noted some of the successes and challenges we had as a team. At that time, we were still trying to figure out ESLint’s model for sustainability. Having money to spend is one thing but knowing how to best use that money is another. Because we didn’t have enough money to pay anyone full time, we tried one maintainer at part time, and that didn’t work. After that experiment, we decided to regroup and reevaluate, ultimately deciding to use a per-hour payment system for team members.Once we settled into the per-hour system, that also gave us information on how many hours each month people were spending on the project. That, in turn, showed us how much money we actually needed each month to continue maintaining ESLint. As a result of that information, we have arrived at a system that we are very pleased with.The guiding principleBefore explaining how ESLint is using the money it collects now, it helps to take a step back to understand the guiding
3年前
記事のアイキャッチ画像
ESLint v8.9.0 released
ESLint Blog
HighlightsNew es2022 environment has been added. When enabled, it adds all ECMAScript 2022 globals (which are currently the same as ECMAScript 2021 globals) and automatically sets the ecmaVersion parser option to 13. Previously, we used to add new ES environments only if they contain new globals compared to previous years. New es2016, es2018, and es2019 environments have also been added to fill in the gaps between years.eslint-scope has been updated to ignore "use strict" directives in ES3 code.eslint-visitor-keys package now contains built-in TypeScript declarations.Features68f64a9 feat: update eslint-scope to ignore "use strict" directives in ES3 (#15595) (Milos Djermanovic)db57639 feat: add es2016, es2018, es2019, and es2022 environments (#15587) (Milos Djermanovic)2dc38aa feat: fix bug with arrow function return types in function-paren-newline (#15541) (Milos Djermanovic)6f940c3 feat: Implement FlatRuleTester (#15519) (Nicholas C. Zakas)Documentation570a036 docs: add one-var exampl
3年前
記事のアイキャッチ画像
ESLint v8.8.0 released
ESLint Blog
HighlightsSuppressed MessagesSuppressed messages are lint messages (errors and warnings) that were suppressed by eslint-disable, eslint-disable-line and eslint-disable-next-line comments.ESLint API now provides information about suppressed lint messages. This information is available to custom formatters and API users as a new property suppressedMessages (array of SuppressedLintMessage objects) on LintResult objects.Features5d60812 feat: implement rfc 2021-suppression-support (#15459) (Yiwei Ding)Documentation5769cc2 docs: fix relative link (#15544) (Nick Schonning)ccbc35f docs: trimmed rules h1s to just be rule names (#15514) (Josh Goldberg)851f1f1 docs: fixed typo in comment (#15531) (Jiapei Liang)7d7af55 docs: address upcoming violation of markdownlint rule MD050/strong-style (#15529) (David Anson)
3年前
記事のアイキャッチ画像
ESLint v8.7.0 released
ESLint Blog
HighlightsThe functionality behind eslint --init has been pulled into a standalone @eslint/create-config package. Now, you can initialize ESLint in a new project with npm init @eslint/config, npx @eslint/create-config, or yarn create @eslint/config.Several rules gained support for arbitrary module namespace names.Features19ad061 feat: no-restricted-imports support casing (#15439) (gfyoung)564ecdb feat: Support arbitrary module namespace names in no-restricted-imports (#15491) (Milos Djermanovic)968a02a feat: Support arbitrary module namespace names in no-useless-rename (#15493) (Milos Djermanovic)0d2b9a6 feat: move eslint --init to @eslint/create-config (#15150) (唯然)127f524 feat: false negative with property option in id-match (#15474) (Nitin Kumar)359b2c1 feat: Support arbitrary module namespace names in the camelcase rule (#15490) (Milos Djermanovic)3549571 feat: Support arbitrary module namespace names in the quotes rule (#15479) (Milos Djermanovic)5563c45 feat: Support arbitrary mo
3年前
記事のアイキャッチ画像
ESLint v8.6.0 released
ESLint Blog
HighlightsESLint v8.6.0 allows rule lists or descriptions in eslint-disable-next-line comments to wrap lines:/* eslint-disable-next-line no-console -- * Here's a very long description about why this configuration is necessary * along with some additional information. */console.log('hello');Features6802a54 feat: handle logical assignment in no-self-assign (#14152) (Zzzen)3b38018 feat: allow to define eslint-disable-next-line in multiple lines (#15436) (Nitin Kumar)9d6fe5a feat: false negative with onlyDeclarations + properties in id-match (#15431) (Nitin Kumar)Documentation6c4dee2 docs: Document homedir is a configuration root (#15469) (Bas Bosman)51c37b1 docs: consistency changes (#15404) (Bas Bosman)775d181 docs: Mention character classes in no-useless-escape (#15421) (Sebastian Simon)Chores3a384fc chore: Upgrade espree to 9.3.0 (#15473) (Brandon Mills)1443cc2 chore: Update blogpost.md.ejs (#15468) (Nicholas C. Zakas)28e907a refactor: remove unused parameter in linter.js (#15451) (Mil
3年前
記事のアイキャッチ画像
ESLint v8.5.0 released
ESLint Blog
HighlightsOne new rule has been added: prefer-object-has-own.The prefer-regex-literals rule now provides suggestions.Features94e77a6 feat: Suggestions support for prefer-regex-literals (#15077) (Yash Singh)eafaf52 feat: add prefer-object-has-own rule (#15346) (Nitin Kumar)Bug Fixes7d832d4 fix: improve prefer-template fixer (#15230) (Nitin Kumar)981fb48 fix: do not report global references in id-match rule (#15420) (Nitin Kumar)f13d4a6 fix: improve autofix of prefer-object-has-own (#15419) (Nitin Kumar)f4559a0 fix: add helpful message when test case has non-string code/name (#15425) (Bryan Mishkin)Documentation314c84c docs: add an incorrect code example in for-direction (#15434) (Holger Jeromin)3928175 docs: add destructuring examples for computed-property-spacing (#15423) (Nitin Kumar)a53e59e docs: add more examples for array-element-newline rule (#15427) (Nitin Kumar)74cf0a0 docs: update CLA info (#15370) (Nitin Kumar)e84195e docs: fix heading level for an option in class-methods-use-
3年前
記事のアイキャッチ画像
ESLint v8.4.1 released
ESLint Blog
Bug Fixes234e3d9 fix: revert changes to reported locations in max-lines-per-function (#15397) (Milos Djermanovic)Documentationfa4d483 docs: fix typo in example for sort-keys rule (#15393) (Nitin Kumar)
3年前
記事のアイキャッチ画像
ESLint v8.4.0 released
ESLint Blog
HighlightsNew Parser OptionThe default parser has a new option allowReserved (boolean, default false). When set to true, reserved words can be used as identifiers.This option can only be used with "ecmaVersion": 3.{ "parserOptions": { "ecmaVersion": 3, "allowReserved": true }}New Features for Custom FormattersThis release adds two new features for custom formatters.Async FormattersFormatters are now allowed to return Promise<string>. That is, a formatter can be an async function.//------ my-formatter.js ------module.exports = async function(results, context) { const something = await getSomethingAsync(); // ... return formattedResults;};context.cwdThe context argument has a new property cwd (string, absolute path). It represents the working directory used for linting. This value comes from the cwd constructor option of the ESLint class, and formatters can use it to output relative paths more reliably than by using process.cwd().//------ my-formatter.js ------module.exports = function(r
3年前
記事のアイキャッチ画像
Contra becomes ESLint gold sponsor
ESLint Blog
We are happy to share that Contra has become an ESLint gold sponsor, donating $1,000 each month for the ongoing maintenance and development of ESLint! Contra is a professional network built around independent work, allowing designers, developers, and more, to live and work the way they want.Here’s what the folks at Contra had to say about ESLint:“ESLint plays a major role in helping us create a safe and consistent experience across a growing number of codebases and engineers. We are grateful for all the open-source projects that are helping us build Contra, and ESLint is the first of many open-source projects that we are committed to back.”-– Gajus Kuizinas, Co-Founder / CTO at ContraESLint is grateful for the support of the Contra team, and we are putting these funds to work by paying more contributors to help maintain and develop ESLint. Donations such as these have allowed us to take on more ambitious projects, such as redesigning the ESLint website, with more to come in 2022.
3年前
記事のアイキャッチ画像
ESLint v8.3.0 released
ESLint Blog
HighlightsThis release supports ES2022 class static blocks in rules, the default parser, and scope analysis.class C { static x = ...; static y; static z; static { try { const obj = doSomethingWith(this.x); this.y = obj.y; this.z = obj.z; } catch { this.y = ...; this.z = ...; } }}It also supports #x in obj, officially known as ergonomic brand checks for private fields.Features60b0a29 feat: add allowProperties option to require-atomic-updates (#15238) (Milos Djermanovic)79278a1 feat: update no-use-before-define for class static blocks (#15312) (Milos Djermanovic)ddd01dc feat: update no-redeclare for class static blocks (#15313) (Milos Djermanovic)de69cec feat: update no-inner-declarations for class static blocks (#15290) (Milos Djermanovic)e2fe7ef feat: support for private-in syntax (fixes #14811) (#15060) (Yosuke Ota)34bc8d7 feat: Update espree and eslint-scope (#15338) (Brandon Mills)b171cd7 feat: update max-depth for class static blocks (#15316) (Milos Djermanovic)6487df3 feat: update
3年前
記事のアイキャッチ画像
The inception of ESLint
ESLint Blog
If you’re like me, you probably use a lot of open source tools every day without thinking about how they got started. Few projects share the “why” of their creation: the actual problem they were trying to solve and when they first came across that problem. You can, of course, benefit from open source projects without understanding their origin story, but I always find it interesting to hear about how it all started.I recently realized that I’d never shared the origin story of ESLint. I’ve shared some of the decisions I made along the way in previous posts but never the initial domino that fell and led to ESLint’s creation. As you will see, ESLint wasn’t created through some divine intervention or stroke of insight, but rather through a series of events that eventually built up to ESLint’s creation.The bugI was still fairly new at Box when a teammate was working on a strange bug. A client had reported problems using the web application in Internet Explorer 7 (we were probably one of the
3年前
記事のアイキャッチ画像
ESLint v8.2.0 released
ESLint Blog
Featuresc9fefd2 feat: report class evaluation TDZ errors in no-use-before-define (#15134) (Milos Djermanovic)Documentationc415c04 docs: Use string rule severity in CLI examples (#15253) (Kevin Partington)12b627d docs: fix typo in working-with-rules.md (#15233) (Nitin Kumar)a86ffc0 docs: fix broken anchor in configuration files (#15223) (Pierre Berger)ee8af5f docs: Link to unit tests from rule documentation (#15207) (Brandon Mills)1c0ca3c docs: add ci and perf tags for commit (#15215) (Nitin Kumar)Build Related796587a build: upgrade eslint-release to v3.2.0 to support conventional commits (#15246) (Milos Djermanovic)Chorescf5b6be chore: update @eslint/eslintrc to avoid different versions of js-yaml (#15265) (Milos Djermanovic)4fd7a6c perf: don’t prepare a fix for valid code in key-spacing (#15239) (Milos Djermanovic)fda533c chore: update strip-ansi dependency (#15221) (Nitin Kumar)67949bd ci: Remove Node 16 CI prerelease workaround (#14935) (Brandon Mills)
3年前
記事のアイキャッチ画像
ESLint v8.1.0 released
ESLint Blog
HighlightsOne new rule has been added: no-unused-private-class-members. This rule reports unused class private fields, methods and accessors.RuleTester now allows name property in test case objects. If you specify name, it will be output instead of the code.Features3d370fb New: Add no-unused-private-class-members rule (fixes #14859) (#14895) (Tim van der Lippe)e926b17 New: Add name to RuleTester (#15179) (Gareth Jones)Bug Fixesd9d84a0 Fix: keyword-spacing conflict with space-infix-ops on > (fixes #14712) (#15172) (Milos Djermanovic)a1f7ad7 Fix: allow baseConfig to extend preloaded plugin config (fixes #15079) (#15187) (Milos Djermanovic)Documentation446b4b3 Docs: Update commit message format docs (#15200) (Nicholas C. Zakas)0fb3bb2 Docs: remove instanceof from keyword-spacing docs (#15180) (Milos Djermanovic)35f3254 Docs: Describe range in rule docs (fixes #14162) (#15174) (Nicholas C. Zakas)2b32f50 Docs: Fix typo in README.md (#15168) (Dmitriy Fishman)2cfbd4b Docs: Update README team
3年前
記事のアイキャッチ画像
ESLint v8.0.1 released
ESLint Blog
This release contains a workaround that will allow Jest to work with ESLint v8.Documentationff5fcd4 Docs: add 13 as allowed ecma version (fixes #15159) (#15162) (唯然)Dependency Upgradesf9217e5 Upgrade: @eslint/[email protected] for Jest workaround (#15164) (Brandon Mills)Choresc584a63 Chore: add ecmaVersion 13 to types.js (#15163) (Milos Djermanovic)
3年前
記事のアイキャッチ画像
ESLint v8.0.0 released
ESLint Blog
HighlightsThere are several breaking changes in v8.0.0. We’ve created a migration guide to explain the breaking changes and describe how to upgrade. In addition, there are several new features:ESLint’s default parser and all core rules now fully support the following ES2022 syntax:Class public instance fields and private instance fieldsClass public static fields and private static fieldsClass private instance methods and accessorsClass private static methods and accessorsRegExp match indicesTop-level awaitAutofix can now remove unused disable directives when --fix and --report-unused-disable-directives are used together.The use of reserved words as identifiers in ES3 is now disallowed. This change only affects users with default parser configured with { "ecmaVersion": 3 } in parser options.The class-methods-use-this rule has a new enforceForClassFields option.The max-classes-per-file rule has a new ignoreExpressions option.The meta.docs.category property has been removed from all core
3年前
記事のアイキャッチ画像
ESLint v8.0.0-rc.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.This version of ESLint is provided to gather feedback from the community before releasing the final version. Please try it and report any unexpected issues.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Enhancements67c0074 Update: Suggest missing rule in flat config (fixes #14027) (#15074) (Nicholas C. Zakas)cf34e5c Update: space-before-blocks ignore after switch colons (fi
3年前
記事のアイキャッチ画像
ESLint v8.0.0-beta.2 released
ESLint Blog
HighlightsThe use of reserved words as identifiers in ES3 is now disallowed. This change only affects users with default parser configured with { "ecmaVersion": 3 } in parser options.All core rules have been updated to support ES2022 class fields and private class members. ESLint now fully supports the following ES2022 syntax:Class public instance fields and private instance fieldsClass public static fields and private static fieldsClass private instance methods and accessorsClass private static methods and accessorsRegExp match indicesTop-level awaitThe class-methods-use-this rule has a new enforceForClassFields option.The max-classes-per-file rule has a new ignoreExpressions option.Since this is a beta release, it is not expected to be ready for production, but please try it and report any unexpected issues.NotesVS Code ESLint extension has added support for ESLint v8.0.0, you’ll just need to install the latest v2.1.25 of the extension.We have received reports from plugin authors abo
3年前
記事のアイキャッチ画像
ESLint v8.0.0-beta.1 released
ESLint Blog
HighlightsBeta testing revealed that the impact of the breaking change to allow line comment directives for all directives that previously required block comments outweighs the benefits of this feature due to a high number of accidental directives, so we decided to revert this change and exclude this feature from v8.0.0.Code Path Analysis now supports ES2022 class fields. In particular, each class field initializer now starts a separate code path. A new origin property has been added to CodePath objects.The meta.docs.category property has been removed from all core rules.Since this is a beta release, it is not expected to be ready for production, but please try it and report any unexpected issues.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we
3年前
記事のアイキャッチ画像
ESLint v8.0.0-beta.0 released
ESLint Blog
HighlightsMost of the highlights of this release are breaking changes, and are discussed further in the migration guide. In addition, there are some new features:The default parser now supports ES2022 syntax, including class fields and top-level await. Some rules still need to be updated, and you can follow progress on the tracking issue.Autofix gained support for removing unused disable directives when using --fix with --report-unused-disable-directives.Since this is a beta release, it is not expected to be ready for production, but please try it and report any unexpected issues.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address th
3年前
記事のアイキャッチ画像
ESLint v7.32.0 released
ESLint Blog
HighlightsThe new --exit-on-fatal-error option will treat parsing errors as fatal and return exit code 2. By default, parsing errors return exit code 1 like rule violations.Features1bfbefd New: Exit on fatal error (fixes #13711) (#14730) (Antonios Katopodis)Enhancementsfaecf56 Update: change reporting location for curly rule (refs #12334) (#14766) (Nitin Kumar)Bug Fixesd7dc07a Fix: ignore lines with empty elements (fixes #12756) (#14837) (Soufiane Boutahlil)Documentationd53d906 Docs: Prepare data for website to indicate rules with suggestions (#14830) (Bryan Mishkin)d28f2ff Docs: Reference eslint-config-eslint to avoid potential for staleness (#14805) (Brett Zamir)f9c164f Docs: New syntax issue template (#14826) (Nicholas C. Zakas)ed945bd Docs: fix multiple broken links (#14833) (Sam Chen)6641d88 Docs: Update README team and sponsors (ESLint Jenkins)Chores3c78a7b Chore: Adopt eslint-plugin/prefer-message-ids rule internally (#14841) (Bryan Mishkin)ed007c8 Chore: Simplify internal no-in
3年前
記事のアイキャッチ画像
ESLint v7.31.0 released
ESLint Blog
Enhancementsa96b05f Update: add end location to report in consistent-return (refs #12334) (#14798) (Nitin Kumar)ddffa8a Update: Indicating the operator in question (#14764) (Paul Smith)bba714c Update: Clarifying what changes need to be made in no-mixed-operators (#14765) (Paul Smith)Documentatione0e8e30 Docs: update BUG_REPORT template (#14787) (Nitin Kumar)39115c8 Docs: provide more context to no-eq-null (#14801) (gfyoung)9a3c73c Docs: fix a broken link (#14790) (Sam Chen)b0d22e3 Docs: Mention benefit of providing meta.docs.url (#14774) (Bryan Mishkin)Dependency Upgradesefdbb12 Upgrade: @eslint/eslintrc to v0.4.3 (#14808) (Brandon Mills)Choresa6a7438 Chore: pin [email protected] (#14771) (Milos Djermanovic)
3年前
記事のアイキャッチ画像
ESLint v7.30.0 released
ESLint Blog
HighlightsYou can now set "ecmaVersion" to "latest" under parserOptions in your configuration file:{ "parserOptions": { "ecmaVersion": "latest" }}"ecmaVersion": "latest" always enables the latest supported ECMAScript version in ESLint’s default parser.Please note that this feature applies only if you are using the default parser. If you’re using a custom parser, refer to the parser’s documentation for the list of available options.Enhancementsed1da5d Update: ecmaVersion allows “latest” (#14720) (薛定谔的猫)104c0b5 Update: improve use-isnan rule to detect Number.NaN (fixes #14715) (#14718) (Nitin Kumar)b08170b Update: Implement FlatConfigArray (refs #13481) (#14321) (Nicholas C. Zakas)Documentation19a871a Docs: Suggest linting plugins for ESLint plugin developers (#14754) (Bryan Mishkin)aa87329 Docs: fix broken links (#14756) (Sam Chen)278813a Docs: fix and add more examples for new-cap rule (fixes #12874) (#14725) (Nitin Kumar)1b8997a Docs: Fix getRulesMetaForResults link syntax (#14723) (B
3年前
記事のアイキャッチ画像
ESLint v7.29.0 released
ESLint Blog
HighlightsThe ESLint class has a new getRulesMetaForResults() method that returns meta information for rules in lint results. ESLint integrations should migrate to ESLint#getRulesMetaForResults() from the getRules() method on the deprecated CLIEngine class.RuleTester test cases now support an optional only boolean property that allows running a single test case in isolation for easier debugging.Featuresbfbfe5c New: Add only to RuleTester (refs eslint/rfcs#73) (#14677) (Brandon Mills)c2cd7b4 New: Add ESLint#getRulesMetaForResults() (refs #13654) (#14716) (Nicholas C. Zakas)Bug Fixes6a1c7a0 Fix: allow fallthrough comment inside block (fixes #14701) (#14702) (Kevin Gibbons)Documentationa47e5e3 Docs: Add Mega-Linter to the list of integrations (#14707) (Nicolas Vuillamy)c93a222 Docs: fix a broken link (#14697) (Sam Chen)Choreseea7e0d Chore: remove duplicate code (#14719) (Nitin Kumar)353ddf9 Chore: enable reportUnusedDisableDirectives in eslint-config-eslint (#14699) (薛定谔的猫)757c495 Chore:
3年前
記事のアイキャッチ画像
What's coming in ESLint v8.0.0
ESLint Blog
Last week, the Technical Steering Committee (TSC) met to finalize the features for ESLint v8.0.0. This feature set had not yet been locked down even as v8.0.0 work began and so this represented an important milestone that allows us to focus on getting this next major release shipped. You can see everything that is planned for v8.0.0 on our project board.Significant changes in v8.0.0The following changes are important to understand as we move towards v8.0.0.Dropping support for Node.js v10.x, 13.x, and 15.xNode.js v10.x end-of-life was April 30, 2021, Node.js v13.x end-of-life was June 1, 2020, and Node.js v15.x end-of-life is this month (June 2021). As a result, ESLint v8.0.0 removes support for all three of these Node.js versions.Removing the codeframe and table formattersIn an ongoing effort to reduce the install size of ESLint, we have decided to remove the codeframe and table formatters from the core of ESLint. Both of these formatters include dependencies that aren’t used anywhere
3年前
記事のアイキャッチ画像
ESLint v7.28.0 released
ESLint Blog
Highlightscontext.getPhysicalFilename()Rules can now use the new method getPhysicalFilename() on the context object to get the full path of the file on disk without any code block information.The difference between getPhysicalFilename and getFilename is observable when ESLint is used with processors:context.getPhysicalFilename() // "/project/example.md" - original filecontext.getFilename() // "/project/example.md/0_0.js" - virtual filename assigned to a code blockFeaturesbb66a3d New: add getPhysicalFilename() method to rule context (fixes #11989) (#14616) (Nitin Kumar)Enhancementsc545163 Update: support multiline /*eslint-env*/ directives (fixes #14652) (#14660) (薛定谔的猫)Bug Fixes1f048cb Fix: no-implicit-coercion false positive with String() (fixes #14623) (#14641) (Milos Djermanovic)e44ce0a Fix: no-duplicate-imports allow unmergeable (fixes #12758, fixes #12760) (#14238) (Soufiane Boutahlil)e4f111b Fix: arrow-body-style crash with object pattern (fixes #14633) (#14635) (Milos Djermanovi
3年前
記事のアイキャッチ画像
ESLint v7.27.0 released
ESLint Blog
HighlightsThe no-restricted-imports rule now allows specifying custom error messages for patterns.Enhancements9e9b5e0 Update: no-unused-vars false negative with comma operator (fixes #14325) (#14354) (Nitin Kumar)52655dd Update: no-restricted-imports custom message for patterns (fixes #11843) (#14580) (Alex Holden)Documentation6a2ced8 Docs: Update README team and sponsors (ESLint Jenkins)Chores2c0868c Chore: merge all html formatter files into html.js (#14612) (Milos Djermanovic)afe9569 Chore: use includes instead of indexOf (#14607) (Mikhail Bodrov)c0f418e Chore: Remove lodash (#14287) (Stephen Wade)967b1c4 Chore: Fix typo in large.js (#14589) (Ikko Ashimine)086c1d6 Chore: add more test cases for no-sequences (#14579) (Nitin Kumar)
3年前
記事のアイキャッチ画像
ESLint v7.26.0 released
ESLint Blog
Features0b6a3f3 New: Include XO style guide in eslint --init (#14193) (Federico Brigante)Enhancementsf071d1e Update: Add automated suggestion to radix rule for parsing decimals (#14291) (Bryan Mishkin)Bug Fixesae6dbd1 Fix: track variables, not names in require-atomic-updates (fixes #14208) (#14282) (Patrick Ahmetovic)ee3a3ea Fix: create .eslintrc.cjs for module type (#14304) (Nitin Kumar)Documentation6791dec Docs: fix example for require-atomic-updates (#14562) (Milos Djermanovic)Dependency Upgradesaaf65e6 Upgrade: eslintrc for ModuleResolver fix (#14577) (Brandon Mills)Chores6a86e50 Chore: remove loose-parser tests (fixes #14315) (#14569) (Milos Djermanovic)
4年前
記事のアイキャッチ画像
ESLint v7.25.0 released
ESLint Blog
Enhancements5df5e4a Update: highlight last write reference for no-unused-vars (fixes #14324) (#14335) (Nitin Kumar)41b3570 Update: lint code block with same extension but different content (#14227) (JounQin)Documentation0023872 Docs: Add deprecated note to working-with-rules-deprecated page (#14344) (Michael Novotny)f2babb1 Docs: update pull request template (#14336) (Nitin Kumar)02dde29 Docs: Fix anchor in ‘docs/developer-guide/working-with-rules.md’ (#14332) (Nate-Wilkins)eb29996 Docs: add more examples with arrow functions for no-sequences rule (#14313) (Nitin Kumar)Chores36fca70 Chore: Upgrade eslump to 3.0.0 (#14350) (Stephen Wade)59b689a Chore: add node v16 (#14355) (薛定谔的猫)fb0a92b Chore: rename misspelled identifier in test (#14346) (Tobias Nießen)07d14c3 Chore: remove extraneous command from lint-staged config (#14314) (James George)
4年前
記事のアイキャッチ画像
ESLint v7.24.0 released
ESLint Blog
HighlightsThe no-implicit-coercion rule has a new disallowTemplateShorthand option.The no-multi-assign rule has a new ignoreNonDeclaration option.Enhancementsf06ecdf Update: Add disallowTemplateShorthand option in no-implicit-coercion (#13579) (Remco Haszing)b51d077 Update: add ignoreNonDeclaration to no-multi-assign rule (fixes #12545) (#14185) (t-mangoe)Bug Fixesc4d8b0d Fix: no-unused-vars ignoreRestSiblings check assignments (fixes #14163) (#14264) (YeonJuan)Documentation71a80e3 Docs: fix broken links in Node.js API docs toc (#14296) (u-sho (Shouhei Uechi))bd46dc4 Docs: Fix incorrect reference to “braces” in arrow-parens (#14300) (emclain)0d6235e Docs: update header in max-lines (#14273) (Shinigami)70c9216 Docs: Update issue triage to include blocked column (#14275) (Nicholas C. Zakas)abca186 Docs: Fix typo in suggestions section (#14293) (Kevin Partington)147fc04 Docs: Fix repro:needed label in bug report template (#14285) (Milos Djermanovic)e1cfde9 Docs: Update bug report template
4年前
記事のアイキャッチ画像
ESLint v7.23.0 released
ESLint Blog
HighlightsThe no-sequences rule has a new option allowInParentheses.Enhancements687ccae Update: add option “allowInParentheses” to no-sequences (fixes #14197) (#14199) (Daniel Rentz)43f1685 Update: --quiet should not supress --max-warnings (fixes #14202) (#14242) (Milos Djermanovic)8984c91 Update: eslint --env-info output os info (#14059) (薛定谔的猫)Bug Fixes28583eb Fix: no-mixed-operators false positives with ? : (fixes #14223) (#14226) (Milos Djermanovic)a99eb2d Fix: Clarify line breaks in object-curly-newline (fixes #14024) (#14063) (armin yahya)Documentation909c727 Docs: Add valid example that shows vars in a block scope (#14230) (Ed S)ebd7026 Docs: Fix typo (#14225) (Greg Finley)Chores49d1697 Chore: Upgrade eslint-plugin-jsdoc to v25 and remove --legacy-peer-deps (#14244) (Brandon Mills)
4年前
記事のアイキャッチ画像
ESLint v7.22.0 released
ESLint Blog
Enhancementsf62ec8d Update: throw error when fix range is invalid (#14142) (Jacob Bandes-Storch)5ad91aa Update: report es2021 globals in no-extend-native (refs #13602) (#14177) (Milos Djermanovic)Documentation3a432d8 Docs: Improve documentation for indent rule (#14168) (Serkan Özel)3ba029f Docs: Remove Extraneous Dash (#14164) (Danny Hurlburt)ddf361c Docs: Fix Formatting (#14154) (Danny Hurlburt)a8df03e Docs: Clarify triage process (#14117) (Nicholas C. Zakas)Dependency Upgrades0eecad2 Upgrade: Update lodash in package.json to V 4.17.21 (#14159) (Basem Al-Nabulsi)Choresc295581 Chore: remove leftover JSDoc from lint-result-cache (#14176) (Milos Djermanovic)0d541f9 Chore: Reduce lodash usage (#14178) (Stephen Wade)459d821 Chore: upgrade dependencies of browser test (#14127) (Pig Fang)
4年前
記事のアイキャッチ画像
ESLint v7.21.0 released
ESLint Blog
HighlightsThe new --cache-strategy CLI option can improve how ESlint detects changed files by looking at either file metadata or contents.Features08ae31e New: Implement cacheStrategy (refs eslint/rfcs#63) (#14119) (Manu Chambon)Enhancements5e51fd2 Update: do not ignore symbolic links (fixes #13551, fixes #13615) (#14126) (Pig Fang)Bug Fixesb8aea99 Fix: pluralize ‘line’ to ‘lines’ in max-lines-per-function description (#14115) (Trevin Hofmann)Dependency Upgrades3cd5440 Upgrade: @eslint/eslintrc to 0.4.0 (#14147) (Brandon Mills)c0b8c71 Upgrade: Puppeteer to 7.1.0 (#14122) (Tim van der Lippe)Chores87c43a5 Chore: improve a few comments and fix typos (#14125) (Tobias Nießen)
4年前
記事のアイキャッチ画像
Nx becomes ESLint gold sponsor
ESLint Blog
We are happy to share that Nx has become an ESLint gold sponsor, donating $1,000 each month for the ongoing maintenance and development of ESLint! Nx is a front-end focused set of tools for working with web applications, with a special focus on monorepo setups.Here’s what the folks at Nx had to say about ESLint:“Nx uses ESLint to enforce code quality, library boundaries, and project visibility constraints. ESLint makes Nx more powerful, so on behalf of the Nx.dev community, we’re proud to do our part and sponsor ESLint’s continued success!”– Jeff Cross, Co-founder and Principal Architect at Nrwl“We help many companies build large systems using Nx. To keep them maintainable, it’s important to follow community and org-specific best practices, and ESLint makes it easy.”– Victor Savkin, Co-founder at NrwlESLint is grateful for the support of the Nx team and we are putting these funds to work by paying more contributors to help maintain and develop ESLint. Due to the support of companies li
4年前
記事のアイキャッチ画像
ESLint v7.20.0 released
ESLint Blog
HighlightsThe no-unused-expressions rule has a new option enforceForJSX to flag unused JSX elements.The following selectors have been updated to support JSX and custom parsers: :first-child, :last-child, :nth-child(n), :nth-last-child(n), sibling ~, and adjacent sibling +. All selectors now support JSX and custom parsers.Enhancementsad90761 Update: add enforceForJSX option to no-unused-expressions rule (#14012) (Duncan Beevers)Bug Fixes9d6063a Fix: Crash with esquery when using JSX (fixes #13639) (#14072) (Yosuke Ota)d6c84af Fix: --init autoconfig shouldn’t add deprecated rules (fixes #14017) (#14060) (Milos Djermanovic)9b277a1 Fix: Support ENOTDIR error code in the folder existence checking utility (#13973) (Constantine Genchevsky)Documentationf4ac3b0 Docs: fix sibling selector descriptions (#14099) (Milos Djermanovic)a0871f1 Docs: Triage process (#14014) (Nicholas C. Zakas)b4e2af5 Docs: Add more fields to bug report template (#14039) (Nicholas C. Zakas)Dependency Upgrades7aeb127 Upgr
4年前
記事のアイキャッチ画像
ESLint v7.19.0 released
ESLint Blog
HighlightsWith this release, we’re excited to publish our revamped configuration guide.Technical writer Khawar Latif Khan spent the last several months since our Google Season of Docs project announcement digging into and improving what used to be a single dense page.The new documentation is logically organized with readability improvements throughout.Thank you Khawar!Enhancementsce7f061 Update: add shadowed variable loc to message in no-shadow (fixes #13646) (#13841) (t-mangoe)c60e23f Update: fix let logic in for-in and for-of loops in no-extra-parens (#14011) (Milos Djermanovic)1a078b9 Update: check ternary : even if ? was reported in space-infix-ops (#13963) (Milos Djermanovic)1c309eb Update: fix no-invalid-regexp false negatives with no flags specified (#14018) (Milos Djermanovic)Bug Fixesd76e8f6 Fix: no-useless-rename invalid autofix with parenthesized identifiers (#14032) (Milos Djermanovic)e1da90f Fix: nested indenting for offsetTernaryExpressions: true (fixes #13971) (#13972) (
4年前
記事のアイキャッチ画像
ESLint v7.18.0 released
ESLint Blog
Enhancementsf17c3c3 Update: check logical assignment operators in the complexity rule (#13979) (Milos Djermanovic)Bug Fixes179a910 Fix: --init crash on question to upgrade/downgrade ESLint (fixes #13978) (#13995) (Milos Djermanovic)292b1c0 Fix: no-extra-parens false positive with let identifier in for-loop (#13981) (Milos Djermanovic)Documentation672deb0 Docs: fix no-invalid-regexp docs regarding ecmaVersion (#13991) (Milos Djermanovic)f2687e7 Docs: update space-in-parens related rules (#13985) (Chris Brody)4a38bbe Docs: space-in-parens examples with no arguments etc. (#13987) (Chris Brody)f6948f6 Docs: Update semantic versioning policy (#13970) (Nicholas C. Zakas)Dependency Upgradese3264b2 Upgrade: @eslint/eslintrc to improve error message for invalid extends (#14009) (Milos Djermanovic)9250d16 Upgrade: Bump lodash to fix security issue (#13993) (Frederik Prijck)Chores78cb483 Chore: test foo( ) with space-in-parens option “always” (#13986) (Chris Brody)aeba5e5 Chore: fix typo (#13975)
4年前
記事のアイキャッチ画像
Google Chrome becomes ESLint gold sponsor
ESLint Blog
We are happy to share that Google Chrome has become an ESLint gold sponsor sponsor, donating $1,000 each month for the ongoing maintenance and development of ESLint! The Chrome team is well known for supporting web developers around the world through not just developing the browser, but also through resources like web.dev, where they document and explain the latest web technologies.Here’s what Addy Osmani from the Chrome team told us:“ESLint has been critical in helping developers write high-quality JavaScript for years. We love that it catches common issues early and often. With a high level of extensibility, ESLint’s ability to let teams enforce custom rules that work for them has been excellent for open-source projects and more.Chrome is happy to sponsor ESLint to help web developers write consistently high-quality code. It’s an essential piece of the modern web development toolkit”– Addy Osmani, Senior Staff Eng. Manager, ChromeESLint is grateful for the support of the Chrome team
4年前
記事のアイキャッチ画像
ESLint v7.17.0 released
ESLint Blog
HighlightsThe multiline-ternary rule is now auto-fixable.Enhancementse128e77 Update: check logical assignment in no-constant-condition (#13946) (Milos Djermanovic)535fe47 Update: use regexpp’s default ecmaVersion in no-control-regex (#13969) (Milos Djermanovic)0649871 Update: add autofix to rule multiline-ternary (#13958) (薛定谔的猫)Bug Fixes83e98cd Fix: use regexpp’s default ecmaVersion in no-invalid-regexp (#13968) (Milos Djermanovic)f6e7e32 Fix: no-useless-escape wrong loc and fix with CRLF in template elements (#13953) (Milos Djermanovic)19c69c0 Fix: one-var shouldn’t split declaration if it isn’t in a statement list (#13959) (Milos Djermanovic)Documentation7297363 Docs: fix examples for no-multi-str (#13966) (Milos Djermanovic)e451b96 Docs: update build tool for webpack (#13962) (Sam Chen)Chorescc48713 Chore: refactor calculating range and loc in no-useless-escape (#13964) (Milos Djermanovic)c3e9acc Chore: fix typos (#13960) (YeonJuan)
4年前
記事のアイキャッチ画像
ESLint v7.16.0 released
ESLint Blog
Enhancementsa62ad6f Update: fix false negative of no-extra-parens with NewExpression (#13930) (Milos Djermanovic)Bug Fixesf85b4c7 Fix: require-atomic-updates false positive across await (fixes #11954) (#13915) (buhi)301d0c0 Fix: no-constant-condition false positives with unary expressions (#13927) (Milos Djermanovic)555c128 Fix: false positive with await and ** in no-extra-parens (fixes #12739) (#13923) (Milos Djermanovic)ab240d4 Fix: prefer-exponentiation-operator invalid autofix with await (#13924) (Milos Djermanovic)Documentationd93c935 Docs: update JSON Schema links (#13936) (Milos Djermanovic)9247683 Docs: Remove for deleted npm run profile script (#13931) (Brandon Mills)2124e1b Docs: Fix wrong rule name (#13913) (noisyboy25)26fc12f Docs: Update README team and sponsors (ESLint Jenkins)Dependency Upgrades8d0c93a Upgrade: [email protected] (#13920) (Rouven Weßling)Choresdc76911 Chore: Add .pre-commit-hooks.yaml file (#13628) (Álvaro Mondéjar)
4年前
記事のアイキャッチ画像
Automattic becomes ESLint's first platinum sponsor
ESLint Blog
We are happy to share that Automattic has become ESLint’s first platinum sponsor, donating $2,000 each month for the ongoing maintenance and development of ESLint! Automattic is the company behind WordPress.com, WooCommerce, Jetpack, Simplenote, Longreads, VaultPress, Akismet, Gravatar, Crowdsignal, Cloudup, Tumblr, and more. Further, Automattic believes in open source and makes a lot of their work public on GitHub and available via the GPL.Here’s what Automattic engineers told us about ESLint:“ESLint helps us keep our code consistent and clean across hundreds of developers.”– Marcus Kazmierczak, Engineering Team Lead, Automattic“ESLint lets me apply my brain to more important things.”– Darren Ethier, Engineering Team Lead, Automattic“Unlike my variables, ESLint is always used.”– Nadir Seghir, JavaScript Engineer, AutomatticESLint is honored and excited to be the first project that Automattic has sponsored through Open Collective. Support from companies like Automattic is why ESLint ha
4年前
記事のアイキャッチ画像
ESLint v7.15.0 released
ESLint Blog
HighlightsThe new no-unsafe-optional-chaining rule catches cases where short-circuiting ?. in an expression can cause a TypeError.Features683ad00 New: no-unsafe-optional-chaining rule (fixes #13431) (#13859) (YeonJuan)Bug Fixescbc57fb Fix: one-var autofixing for export (fixes #13834) (#13891) (Anix)Documentation110cf96 Docs: Fix a broken link in working-with-rules.md (#13875) (Anton Niklasson)Dependency Upgrades5c11aab Upgrade: @eslint/esintrc and espree for bug fixes (refs #13878) (#13908) (Brandon Mills)0eb7957 Upgrade: [email protected] (#13877) (Rouven Weßling)
4年前
記事のアイキャッチ画像
ESLint v7.14.0 released
ESLint Blog
HighlightsThe no-nonoctal-decimal-escape rule has been added. This rule disallows the use of legacy escape sequences \8 and \9 in string literals.Features98c00c4 New: Add no-nonoctal-decimal-escape rule (fixes #13765) (#13845) (Milos Djermanovic)Enhancements5f09073 Update: fix ‘skip’ options in no-irregular-whitespace (fixes #13852) (#13853) (Milos Djermanovic)Bug Fixes2004b7e Fix: enable debug logs for @eslint/eslintrc (fixes #13850) (#13861) (Milos Djermanovic)d2239a1 Fix: no-useless-constructor crash on bodyless constructor (fixes #13830) (#13842) (Ari Perkkiö)Documentation1861b40 Docs: correct the function-call-argument-newline ‘default’ descriptions (#13866) (Trevin Hofmann)eda0aa1 Docs: no-restricted-imports is only for static imports (#13863) (Robat Williams)042ae44 Docs: Fix JS syntax and doc URL in working-with-custom-formatters.md (#13828) (Raphael LANG)Chores95d2fe6 Chore: remove eslint comment from no-octal-escape tests (#13846) (Milos Djermanovic)038dc73 Chore: Test on Nod
4年前
記事のアイキャッチ画像
ESLint v7.13.0 released
ESLint Blog
HighlightsPer-rule performance metrics can now show more than ten rules. Set the TIMING environment variable to the desired list size or all to display all rules.$ TIMING=50 eslint lib$ TIMING=100 eslint lib$ TIMING=all eslint libFeatures254e00f New: Configurable List Size For Per-Rule Performance Metrics (#13812) (Bryan Mishkin)Documentation6c3c710 Docs: fix broken url in docs (#13815) (SaintMalik)fb6fcbf Docs: Fix reference to Code of Conduct (#13797) (Tobias Nießen)
4年前
記事のアイキャッチ画像
ESLint v7.12.1 released
ESLint Blog
Bug Fixesaeef485 Fix: Pass internal config paths in FileEnumerator default (fixes #13789) (#13792) (Brandon Mills)Dependency Upgrades08f33e8 Upgrade: @eslint/eslintrc to fix rule schema validation (fixes #13793) (#13794) (Brandon Mills)
4年前
記事のアイキャッチ画像
ESLint v7.12.0 released
ESLint Blog
Enhancementscbf3585 Update: skip keyword check for fns in space-before-blocks (fixes #13553) (#13712) (Milos Djermanovic)bfddced Update: remove suggestion if it didn’t provide a fix (fixes #13723) (#13772) (Milos Djermanovic)5183b14 Update: check template literal in no-script-url (#13775) (YeonJuan)603de04 Update: treat all literals like boolean literal in no-constant-condition (#13245) (Zen)0510621 Update: Fix && vs || short-circuiting false negatives (fixes #13634) (#13769) (Brandon Mills)67c0605 Update: check computed keys in no-prototype-builtins (fixes #13088) (#13755) (Milos Djermanovic)Bug Fixes256f656 Fix: autofix shouldn’t produce template literals with \8 or \9 (#13737) (Milos Djermanovic)b165aa5 Fix: yoda rule autofix produces syntax errors with adjacent tokens (#13760) (Milos Djermanovic)3175316 Fix: prefer-destructuring invalid autofix with comma operator (#13761) (Milos Djermanovic)Documentation637f818 Docs: add more examples for no-func-assign (fixes #13705) (#13777) (Ni
4年前
記事のアイキャッチ画像
ESLint v7.11.0 released
ESLint Blog
Enhancementsda78fa1 Update: support async arrow fn in function-paren-newline (fixes #13728) (#13729) (Michal Dziekonski)Bug Fixesfa9429a Fix: don’t count line after EOF in max-lines (#13735) (Milos Djermanovic)27f0de6 Fix: account for linebreaks before postfix ++/-- in no-extra-parens (#13731) (Milos Djermanovic)Documentationd973675 Docs: Update anchor links to use existing linkrefs (refs #13715) (#13741) (Brandon Mills)2c6d774 Docs: Fix typos (#13730) (Frieder Bluemle)ab0ac6c Docs: Fix anchor links (#13715) (Gary Moore)fe301b8 Docs: Add configuration comments in examples (#13738) (YeonJuan)Dependency Upgradescc468c0 Upgrade: [email protected] (#13732) (Milos Djermanovic)Chores23e966f Chore: Refactor CLIEngine tests (refs #13481) (#13709) (Nicholas C. Zakas)
4年前
記事のアイキャッチ画像
A year of paying contributors: Review
ESLint Blog
It was in February of 2019 that we announced the launch of the ESLint Collective to fund ESLint’s ongoing development. One of the primary reasons for seeking funding was due to the increasing amount of time required to maintain a project that, as of today, is downloaded over 13 million times each week. We waited until the last quarter of 2019 before we started paying contributors because we wanted to see what our monthly sponsorships would stabilize at and so we’d have some money saved to guarantee a certain amount would be available to pay contributors. Since then, we’ve tried a few different approaches with varying degrees of success and failure, and we’d like to share that experience.The Technical Steering CommitteeThe Technical Steering Committee (TSC) is a group of five people who manage the overall direction of the ESLint project. Most of the work that goes into each ESLint release is done by TSC members, including the actual release process itself. Additionally, TSC members revi
4年前
記事のアイキャッチ画像
ESLint v7.10.0 released
ESLint Blog
HighlightsNew option ignorePattern in the no-inline-comments rule.Enhancements07d9bea Update: Add ignorePattern to no-inline-comments (#13029) (Edie Lemoine)Bug Fixescb44e93 Fix: prefer-destructuring invalid autofix with computed property access (#13704) (Milos Djermanovic)Documentation6919fbb Docs: Clarify that ignorePattern should be a string (refs #13029) (#13718) (Brandon Mills)d79bbe9 Docs: fix typo (#13717) (Alexander Liu)9b8490e Docs: grammatical error (#13687) (rajdeep)51674a4 Docs: Add missing quotes (#13714) (Lucio Paiva)30b76c9 Docs: Clarify package.json requirement in Getting Started (refs #13549) (#13696) (Nicholas C. Zakas)Dependency Upgrades46c73b1 Upgrade: [email protected] (#13716) (Milos Djermanovic)Choresb7b12ba Chore: Move comment to make tests more organized (#13707) (Yusuke Tanaka)7c34a98 Chore: remove mistakenly added file (#13710) (Milos Djermanovic)
4年前
記事のアイキャッチ画像
Supporting ESLint's dependencies
ESLint Blog
When ESLint first started accepting donations, it was with the explicit goal of creating a sustainable future for the project. In the short term, that meant ensuring we could compensate those who spent a significant amount of time on the project, but we always intended that to be a starting point and not an end. There is so much more that goes into open source sustainability and we wanted to be mindful of that as we continued to grow. That’s why we’re excited to announce that we’re now supporting several of the projects that ESLint itself is built upon.Sponsors choose to support ESLint because they have come to depend on ESLint, and as such, want to ensure that the project continues. Similarly, ESLint is built on top of smaller open source projects, and we feel like it is our responsibility to also help those projects thrive. We’re grateful to our sponsors for helping us get to 50% of our $20,000/month goal, and we feel that it’s time to spread some of that success to our dependencies.
4年前
記事のアイキャッチ画像
ESLint v7.9.0 released
ESLint Blog
Enhancements6f87db7 Update: fix id-length false negatives on Object.prototype property names (#13670) (Milos Djermanovic)Bug Fixes3ca2700 Fix: Corrected notice for invalid (:) plugin names (#13473) (Josh Goldberg)29d1cdc Fix: prefer-destructuring removes comments (refs #13678) (#13682) (Milos Djermanovic)361ac4d Fix: NonOctalDecimalIntegerLiteral is decimal integer (fixes #13588) (#13664) (Milos Djermanovic)Documentationfc5783d Docs: Fix leaky anchors in v4 migration page (#13635) (Timo Tijhof)f1d07f1 Docs: Provide install commands for Yarn (#13661) (Nikita Baksalyar)b4da0a7 Docs: fix typo in working with plugins docs (#13683) (啸生)f260716 Docs: update outdated link (#13677) (klkhan)5138c91 Docs: add missing eslint directive comments in no-await-in-loop (#13673) (Milos Djermanovic)17b58b5 Docs: clarify correct example in no-return-await (fixes #13656) (#13657) (Milos Djermanovic)Chores9171f0a Chore: fix typo (#13660) (Nitin Kumar)
4年前
記事のアイキャッチ画像
ESLint v7.8.1 released
ESLint Blog
Bug Fixesf542b5d Fix: Update broken @eslint/eslintrc version (fixes #13641) (#13647) (Nicholas C. Zakas)
4年前
記事のアイキャッチ画像
ESLint v7.8.0 released
ESLint Blog
HighlightsSupport for logical assignment operators and numeric separators has landed in ESLint! To enable linting this syntax, please set ecmaVersion to 2021:{ "parserOptions": { "ecmaVersion": 2021 }}Enhancements58abd93 Update: support logical assignments in code path analysis (refs #13569) (#13612) (Milos Djermanovic)db7488e Update: support logical assignments in core rules (refs #13569) (#13618) (Milos Djermanovic)88a9ade Update: add es2021 environment (refs #13602) (#13603) (Milos Djermanovic)0003dc0 Update: support numeric separators (refs #13568) (#13581) (Milos Djermanovic)96b11a0 Update: Add exceptionPatterns to id-length rule (fixes #13094) (#13576) (sodam)3439fea Update: support numeric-separator in no-loss-of-precision (refs #13568) (#13574) (Anix)ed64767 Update: add comment to message in no-warning-comments (fixes #12327) (#13522) (Anix)66442a9 Update: Add no-magic-numbers ‘ignoreDefaultValues’ option (#12611) (Dieter Luypaert)Documentation3729219 Docs: Update Step 1 of Dev
4年前
記事のアイキャッチ画像
Announcing ESLint's public roadmap
ESLint Blog
When ESLint first started accepting donations, we listed several ways that the project intended to spend the money donated:Paying team members for maintenance and development. We hired our first part-time maintainer, Kai Cataldo, and started paying TSC members on a per-hour basis up to $1,000 each month (the maximum we can afford at the moment).Rewarding contributions from the community. We have given spot bonuses to people who have made significant contributions to ESLint.Improve documentation. We are participating in the 2020 Google Season of Docs to improve our documentation.Better communication and support. Paying team members has allowed us to participate in the monthly TC39 tooling meeting and allowed us to pay contributors to help answer questions both in GitHub and in Discord.Developing a Roadmap. Today, we are announcing our first public roadmap!That last bullet point, developing a roadmap, is something we’ve been working hard to figure out for several months. Paying contribut
4年前
記事のアイキャッチ画像
Introducing the ESLint Google Season of Docs project and technical writer
ESLint Blog
This year, ESLint was accepted into the Google Season of Docs (GSoD) program for the first time (thanks, in large part, to our sponsors). The ESLint team has always placed a high value on quality documentation for the project and we came up with a list of projects that we thought could improve our documentation. We received more than 20 applications through GSoD, and after a lot of time grading and reviewing applications, we finally ended up with our technical writer!It’s our pleasure to introduce Khawar Latif Khan, the 2020 ESLint GSoD technical writer. Here’s a little about Khawar, straight from him:I am an engineer turned communications specialist from Pakistan, with a passion to create helpful and understandable content. I have a graduate degree in Technical and Professional Communication from North Carolina State University, under the Fulbright Scholarship. During and after my undergraduate degree in Electrical Engineering, I got interested in communicating complex technical knowl
4年前
記事のアイキャッチ画像
ESLint v7.7.0 released
ESLint Blog
HighlightsIn ESLint v7.3.0, we released a change to the comma-dangle rule that disallowed having multiple options in the rule’s configuration. Our semantic versioning policy allows for changes that may introduce new errors in semver-minor releases if the change is considered a bug fix and, at the time, we decided that this change fell under that category. After discussing internally whether this was the correct application of our policy or not, we have decided to update our semantic versioning policy to include rule schemas as part of the public API and to revert this change in this release.Enhancementsb46f3ee Update: allowFunctionParams option in no-underscore-dangle (fixes 12579) (#13545) (Sunghyun Cho)Bug Fixes4e0b672 Fix: revert “Update: disallow multiple options in comma-dangle schema” (#13564) (Kai Cataldo)254990e Fix: indent for async arrow functions (fixes #13497) (#13544) (Anix)Documentation26aa245 Docs: clarify “case” specifier in padding-line-between-statements (#13562) (Mil
4年前
記事のアイキャッチ画像
Microsoft donates $10,000 to ESLint as first FOSS Fund recipient
ESLint Blog
We are happy to share that Microsoft has donated $10,000 to the ESLint project as part of their FOSS Fund. Similar to the Indeed FOSS Contributor Fund and Salesforce FOSS Contributor Fund, the Microsoft FOSS Fund donates $10,000 to qualifying open source projects each quarter. Microsoft employees who have contributed to an open source project that is both used by Microsoft and not an official Microsoft project may nominate and vote on potential project recipients. ESLint is honored to be the first recipient from the Microsoft FOSS Fund!Here’s what Microsoft’s Jan Pilzer and Steve Faulkner, who nominated ESLint, had to say:“When I started working in JavaScript professionally many years ago, I realized there was potential of hidden errors and hard to detect problems. Looking into ways to improve the situation for me and my teams, I used various linting tools and was immediately captured by the potential and power of ESLint when it was created. Then and now, ESLint is an incredibly import
4年前
記事のアイキャッチ画像
Making ESLint more inclusive
ESLint Blog
From its beginning, the ESLint project has sought to be a place that is welcoming and inclusive of everyone. We adopted a code of conduct before doing so was common (even before we joined the jQuery Foundation, now the OpenJS Foundation) and the project has been maintained by a group of developers from all around the world, representing a variety of ethnicities, cultures, and countries. Even so, we understand that inclusivity is a process that must be adapted as we learn and grow. There is always some way to be more welcoming, and today we’re happy to share with you some of our recent efforts.Eliminating problematic terminologyOne of the areas where we’ve made changes in the project is through the use of more inclusive terminology. We recently did an audit of our codebase to look for words with negative connotations. In doing so, we discovered that we had a few instances of the word “blacklist” in the project, not just inside of code but also in the name of the id-blacklist rule.In v7.
4年前
記事のアイキャッチ画像
Salesforce donates $10,000 to ESLint
ESLint Blog
We are happy to share that Salesforce has donated $10,000 to the ESLint project as part of their FOSS Contributor Fund. The FOSS Contributor Fund donates $10,000 to qualifying open source projects each quarter. Salesforce employees who have contributed to an open source project nominate and vote on potential project recipients. For this quarter, ESLint was selected as the recipient. (Read about it on the Salesforce Blog, too.)Here’s what Médédé Raymond KPATCHAA, who nominated ESLint, had to say:“ESLint is an extremely useful tool for any JavaScript project. This tool allows us to set up consistent code formatting rules adopted by the whole team from the beginning of the project, greatly facilitates code reviews, and makes it easy to integrate new developers into the team. I know I am not alone in appreciating its flexibility and ease-of-use.” – Médédé Raymond KPATCHAA, Technical Architect, SalesforceWe are grateful to Médédé for nominating ESLint this quarter and to the Salesforce empl
4年前
記事のアイキャッチ画像
ESLint v7.6.0 released
ESLint Blog
HighlightsRuleTester requires meta.fixable for fixable rulesFixable rules are required to have a meta.fixable property. A bug in the RuleTester class (which is intended to help plugin authors write and test custom rules) was recently surfaced in which fixable rules that do not export metadata (the meta property) are not validated for the existence of a meta.fixable property, while rules that do export meta are.This has been fixed in this release! Unfortunately, this can lead to new errors being reported by the RuleTester for rules that apply fixes and are missing a meta property. Please feel free to stop by our help channel if you need assistance resolving this issue.Enhancementsecb2b73 Update: require meta for fixable rules in RuleTester (refs #13349) (#13489) (Milos Djermanovic)e71e298 Update: Change no-duplicate-case to comparing tokens (fixes #13485) (#13494) (Yosuke Ota)Bug Fixes318fe10 Fix: Do not output undefined as line and column when it’s unavailable (#13519) (haya14busa)16b1
4年前
記事のアイキャッチ画像
ESLint v7.5.0 released
ESLint Blog
HighlightsOptional Chaining SupportSupport for optional chaining has landed in ESLint!const maybeProp = obj.first?.second;The default parser and built-in rules will support this syntax when you enable parserOptions.ecmaVersion: 2020 in your configuration:{ "parserOptions": { "ecmaVersion": 2020 }}Deprecating id-blacklistid-blacklist has been deprecated and replaced with id-denylist. We renamed id-blacklist to id-denylist in the previous release (v7.4.0), which unfortunately led to some unintended breakages in the ESLint ecosystem. In this release, we have added back the id-blacklist rule and have marked it as deprecated. If you are currently using id-blacklist, we recommend switching to id-denylist to ensure you receive bug fixes and updates to the rule in future releases.Enhancements6ea3178 Update: optional chaining support (fixes #12642) (#13416) (Toru Nagashima)f4d7b9e Update: deprecate id-blacklist rule (#13465) (Dimitri Mitropoulos)c8f9c82 Update: Improve report location no-irregu
4年前
記事のアイキャッチ画像
ESLint v7.4.0 released
ESLint Blog
HighlightsShortly after the v7.3.0 release, we received an issue that eslint-config-airbnb was breaking because it used Infinity in a rule config. Infinity should have been forbidden by the rule’s option schema, but a bug in Ajv, the JSON schema validator that ESLint uses, incorrectly allowed Infinity when an integer was specified. This was finally caught because the v7.3.0 release included a change that fixed an unrelated issue by serializing rule configs. ESLint expects rule configs to be JSON-serializable for consistency between all supported JSON, YAML, and JS .eslintrc formats, and it relies on this property in the --cache and --print-config command line options.Updating eslint-config-airbnb to use Number.MAX_SAFE_INTEGER instead of Infinity is the ideal solution but would have taken too long. Since this was the only reported issue and isolated to eslint-config-airbnb rather than end-user configs, we implemented an exception that replaced Infinity with Number.MAX_SAFE_INTEGER and
4年前
記事のアイキャッチ画像
ESLint v7.3.1 released
ESLint Blog
The v7.3.0 release included a fix for an unrelated issue that caused a configuration issue in eslint-config-airbnb that had previously gone unnoticed to start failing. ESLint expects configurations to be JSON-serializable, so configurations that use Infinity or other non-JSON-serializable values may cause undefined behavior in some parts of ESLint including caching and the --print-config command line argument. In this case, the use of Infinity was not caught until now due to a gap in the JSON schema validator that ESLint uses for which a fix has been implemented and is awaiting release.In order to give users time to upgrade to an updated version of eslint-config-airbnb when it becomes available, this v7.3.1 release includes a temporary workaround for Infinity that will allow linting to continue despite the undefined behavior elsewhere.Bug Fixesde77c11 Fix: Replace Infinity with Number.MAX_SAFE_INTEGER (fixes #13427) (#13435) (Nicholas C. Zakas)
4年前
記事のアイキャッチ画像
ESLint v7.3.0 released
ESLint Blog
HighlightsThe new no-promise-executor-return rule prevents returning unreadable values from inside new Promise(...) executors.The new no-unreachable-loop rule catches loops that are guaranteed to execute only once.Several rules have been updated to report more accurate source code locations.Several rule option schemas have been improved to catch configuration typos.Features9e1414e New: Add no-promise-executor-return rule (fixes #12640) (#12648) (Milos Djermanovic)b550330 New: Add no-unreachable-loop rule (fixes #12381) (#12660) (Milos Djermanovic)Enhancements638a6d6 Update: add missing additionalProperties: false to some rules’ schema (#13198) (Milos Djermanovic)949a5cd Update: fix operator-linebreak overrides schema (#13199) (Milos Djermanovic)09cc0a2 Update: max-lines reporting loc improvement (refs #12334) (#13318) (Anix)ee2fc2e Update: object-property-newline end location (refs #12334) (#13399) (Anix)d98152a Update: added empty error array check for false negative (#13200) (Anix)76
4年前
記事のアイキャッチ画像
ESLint v7.2.0 released
ESLint Blog
HighlightsECMAScript 2020 syntax support has landed in ESLint! This release adds support for the following language features in the default parser and core rules:Nullish coalescing operatorexport * as ns from "source"import.metaNote: We are aware that optional chaining support is still missing. If you’re interested in following the process of implementing support for this syntax, please subscribe to this ESTree issue.Enhancementsb735a48 Update: add enforceForFunctionPrototypeMethods option to no-extra-parens (#12895) (Milos Djermanovic)27ef73f Update: reporter locr of func-call-spacing (refs #12334) (#13311) (Anix)353bfe9 Update: handle parentheses in multiline-ternary (fixes #13195) (#13367) (Milos Djermanovic)a7fd343 Update: keyword-spacing unexpected space loc improve (refs #12334) (#13377) (Anix)dd949ae Update: support ?? operator, import.meta, and export * as ns (#13196) (Toru Nagashima)d5fce9f Update: enable es2020 environment in --init (#13357) (Milos Djermanovic)b76aef7 Update:
4年前
記事のアイキャッチ画像
ESLint v7.1.0 released
ESLint Blog
Featuresc636d57 New: no-loss-of-precision (fixes #11279) (#12747) (jmoore914)Enhancementsdf01af1 Update: padded-blocks loc position changes (refs #12334) (#13328) (Anix)25462b2 Update: block-spacing changed loc for extra (refs #12334) (#13314) (Anix)a195141 Update: reporting location for semi-spacing (refs #12334) (#13285) (Anix)b0a6b81 Update: Improve report location for rest-spread-spacing (refs #12334) (#13313) (Milos Djermanovic)89e1081 Update: Improve report location for linebreak-style (refs #12334) (#13317) (Milos Djermanovic)742941d Update: added typescript-eslint/recommended configs for init (#13235) (Anix)Bug Fixesa93083a Fix: astUtils.getNextLocation returns invalid location after CRLF (#13275) (Milos Djermanovic)bd3f092 Fix: max-lines-per-function flagging arrow IIFEs (fixes #13332) (#13336) (cherryblossom000)de0aab9 Fix: report end loc in one-var-declaration-per-line (refs #12334) (#13326) (YeonJuan)1710296 Fix: no-new-symbol false positive with Symbol as an argument (#133
4年前
記事のアイキャッチ画像
Changes to our rules policies
ESLint Blog
When ESLint was first created, the idea was to have a small set of 20-30 core rules that could get everyone started, and then to let the community build out its own rules to fill in any remaining gaps. We did, however, continue implementing core rules as it seemed helpful to the point where today there are 280 core rules. At any given time, more than half of open issues and pull requests are related to rules that take up a significant portion of the team’s time.ESLint now benefits from a thriving ecosystem of rule-focused plugins like eslint-plugin-node, eslint-plugin-import, eslint-plugin-react, and many others. Tools like astexplorer.net and numerous tutorials have made it easier than ever for developers to write their own rules. The core team no longer needs to build up a critical mass of basic rules, so we can prioritize our time on long-awaited core features like parallel linting that will benefit the whole community. We’re making some changes to how we prioritize changes to built
4年前
記事のアイキャッチ画像
ESLint v7.0.0 released
ESLint Blog
HighlightsThere are several breaking changes in 7.0.0. We’ve created a migration guide to explain the breaking changes and describe how to upgrade.Dropping support for Node.js v8Node.js 8 reached EOL in December 2019, and we are officially dropping support for it in this release.Core rule changesThe ten Node.js/CommonJS rules in core have been deprecated and moved to the eslint-plugin-node plugin.Several rules have been updated to recognize bigint literals and warn on more cases by default.eslint:recommended has been updated with a few new rules: no-dupe-else-if, no-import-assign, and no-setter-return.Improved developer experienceThe default ignore patterns have been updated. ESLint will no longer ignore .eslintrc.js and bower_components/* by default. Additionally, it will now ignore nested node_modules directories by default.ESLint will now lint files with extensions other than .js if they are explicitly defined in overrides[].files - no need to use the --ext flag!ESLint now supports
5年前
記事のアイキャッチ画像
ESLint v7.0.0-rc.0 released
ESLint Blog
HighlightsThis release includes a new asynchronous ESLint API for use in Node.js environments. This will allow for the support of ES Module configuration files and plugins and is a prerequisite for implementing parallel linting.Node.js and CommonJS core rules have been deprecated in favor of eslint-plugin-node.The reported error location has been fine-tuned in a number of core rules.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Enhancements0b1d65a Update: Improve report
5年前
記事のアイキャッチ画像
ESLint v7.0.0-alpha.3 released
ESLint Blog
HighlightsThis release contains the following breaking changes:Making RuleTester checks stricter.Plugins are now loaded relative to the configs that reference them.Use the current working directory as base path when using --config.It also adds support for the following new language features:Core rules now support globalThis.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changes78c8cda Breaking: RuleTester Improvements (refs eslint/rfcs#25) (#12955) (Milos Dje
5年前
記事のアイキャッチ画像
ESLint v7.0.0-alpha.2 released
ESLint Blog
HighlightsThis release contains the following breaking changes:Updating default configuration options in core rules.Updating the rules recommended in eslint:recommended.Making RuleTester checks stricter.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changes4af06fc Breaking: Test with an unknown error property should fail in RuleTester (#12096) (Milos Djermanovic)afa9aac Breaking: class default true computed-property-spacing (fixes #12812) (#12915) (Milos Djer
5年前
記事のアイキャッチ画像
What's coming in ESLint v7.0.0
ESLint Blog
Last week, the Technical Steering Committee (TSC) met to finalize the features for ESLint v7.0.0. This feature set had not yet been locked down even as v7.0.0 work began and so this represented an important milestone that allows us to focus on getting this next major release shipped. You can see everything that is planned for v7.0.0 on our project board.Significant changes in v7.0.0The following changes are important to understand as we move towards v7.0.0.Dropping support for Node.js v8.xNode.js v8.x was officially end-of-lifed in December 2019 and so v7.0.0 removes support for this version of Node.js.ESLint class replacing CLIEngine classFrom ESLint’s early days, we have provided a CLIEngine class to allow developers to create ESLint integrations. This class is at the center of things like editor plugins, build tool integrations, and zero-configuration linters. The CLIEngine class powers ESLint itself and has been an important part of the project for many years.Unfortunately, the CLI
5年前
記事のアイキャッチ画像
ESLint v7.0.0-alpha.1 released
ESLint Blog
HighlightsMost of the highlights of this release are breaking changes, and are discussed further in the migration guide.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changes4293229 Breaking: use-isnan enforceForSwitchCase default true (fixes #12810) (#12913) (Milos Djermanovic)cf38d0d Breaking: change default ignore pattern (refs eslint/rfcs#51) (#12888) (Toru Nagashima)bfe1dc4 Breaking: no-dupe-class-members checks some computed keys (fixes #12808) (#12837)
5年前
記事のアイキャッチ画像
ESLint v7.0.0-alpha.0 released
ESLint Blog
HighlightsMost of the highlights of this release are breaking changes, and are discussed further in the migration guide.In addition to the breaking changes, we have three new rules:default-case-lastno-useless-backreferenceno-restricted-exportsInstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’re working on a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changes1aa021d Breaking: lint overrides files (fixes #10828, refs eslint/rfcs#20) (#12677) (Toru Nagashima)b50179d Breaking: Check assignment targets in no-extra-parens (
5年前
記事のアイキャッチ画像
ESLint v6.8.0 released
ESLint Blog
HighlightsThe new --no-error-on-unmatched-pattern CLI flag prevents errors when a quoted glob pattern or --ext is not matched.ESLint now looks for .eslintrc.cjs config files to allow CommonJS-based configs in ES Module-based packages.Features1713d07 New: Add no-error-on-unmatched-pattern flag (fixes #10587) (#12377) (ncraley)Enhancements5c25a26 Update: autofix bug in lines-between-class-members (fixes #12391) (#12632) (YeonJuan)05faebb Update: improve suggestion testing experience (#12602) (Brad Zacher)05f7dd5 Update: Add suggestions for no-unsafe-negation (fixes #12591) (#12609) (Milos Djermanovic)1600648 Update: Allow $schema in config (#12612) (Yordis Prieto)acc0e47 Update: support .eslintrc.cjs (refs eslint/rfcs#43) (#12321) (Evan Plaice)a230f84 Update: include node version in cache (#12582) (Eric Wang)6e36d12 Update: do not recommend require-atomic-updates (refs #11899) (#12599) (Kai Cataldo)Bug Fixesc5c7086 Fix: ignore aligning single line in key-spacing (fixes #11414) (#12652) (
5年前
記事のアイキャッチ画像
ESLint v6.7.2 released
ESLint Blog
Bug Fixesbc435a9 Fix: isSpaceBetweenTokens() recognizes spaces in JSXText (fixes #12614) (#12616) (Toru Nagashima)4928d51 Fix: don’t ignore the entry directory (fixes #12604) (#12607) (Toru Nagashima)ea16de4 Fix: Support tagged template literal generics in no-unexpected-multiline (#11698) (Brad Zacher)Documentationb41677a Docs: Clarify suggestion’s data in Working with Rules (refs #12606) (#12617) (Milos Djermanovic)
5年前
記事のアイキャッチ画像
ESLint v6.7.1 released
ESLint Blog
Bug Fixesdd1e9f4 Fix: revert changes to key-spacing due to regression (#12598) (Kai Cataldo)Documentationc644b54 Docs: Update README team and sponsors (ESLint Jenkins)
5年前
記事のアイキャッチ画像
ESLint v6.7.0 released
ESLint Blog
HighlightsSuggestions APIThis release contains a new Suggestions API for rule authors and integrations. You can read more about this exciting new feature here.ignorePatterns in config filesThis release adds a new ignorePatterns property in config files (including shareable configs) in order to control the files ESLint ignores. See also documentation.New Rulesgrouped-accessor-pairsno-constructor-returnno-dupe-else-ifno-setter-returnprefer-exponentiation-operatorDeprecationsPlease note that these deprecated features may be removed in a future major release of ESLint.Personal configuration filessourceCode#isSpaceBetweenTokens() has been deprecated in favor of sourceCode#isSpaceBetween().Features312a88f New: Add grouped-accessor-pairs rule (fixes #12277) (#12331) (Milos Djermanovic)6eaad96 New: Add suggestions API (#12384) (Will Douglas)1a2eb99 New: new rule no-constructor-return (fixes #12481) (#12529) (Pig Fang)ca3b2a6 New: ignorePatterns in config files (refs eslint/rfcs#22) (#12274) (T
5年前
記事のアイキャッチ画像
Funding ESLint's Future: November Update
ESLint Blog
Back in February, we announced the creation of the ESLint Collective to raise funds for the ongoing maintenance and development of ESLint. Our goal was to raise $20,000 each month to support the project, and since then, we’ve been grateful for contributions from nearly 150 companies, projects, and individuals towards that goal.We are happy to share that we are currently sponsored at just under $10,000 per month, almost 50% of our goal! At this level, we’ve been able to start paying team members for their time (more about this below), ensuring ESLint gets the ongoing support it needs.How we’ve used the moneyAs mentioned above, the most exciting thing we’ve been able to do with the money you’ve donated is pay a team member to work on ESLint part-time. Kai Cataldo has been involved with ESLint for several years and for the past two months has been working part-time on ESLint. Having Kai consistently working on the project has meant faster response times to issues and pull requests, and be
5年前
記事のアイキャッチ画像
ESLint v6.6.0 released
ESLint Blog
HighlightsRules can now access context.getCwd() to get the current working directoryThe use-isnan rule has a new enforceForIndexOf optionThe no-param-reassign rule has a new ignorePropertyModificationsForRegex optionThe no-unsafe-negation rule has a new enforceForOrderingRelations optionThe no-extra-parens has a new enforceForNewInMemberExpressions optionIn addition, we have improved the error report locations for a number of rules with this release.Features874fe16 New: pass cwd from cli engine (#12389) (Eric Wang)Enhancements39dfe08 Update: false positives in function-call-argument-newline (fixes #12123) (#12280) (Scott O’Hara)4d84210 Update: improve report location for no-trailing-spaces (fixes #12315) (#12477) (Milos Djermanovic)c6a7745 Update: no-trailing-spaces false negatives after comments (fixes #12479) (#12480) (Milos Djermanovic)c6a9a3b Update: Add enforceForIndexOf option to use-isnan (fixes #12207) (#12379) (Milos Djermanovic)364877b Update: measure plugin loading time and
5年前
記事のアイキャッチ画像
ESLint v6.5.1 released
ESLint Blog
Bug Fixes447ac87 Fix: no-useless-rename handles ExperimentalRestProperty (fixes #12335) (#12339) (Kai Cataldo)Documentation0d3d7d9 Docs: fix typo in no-magic-numbers (#12345) (Josiah Rooney)
5年前
記事のアイキャッチ画像
ESLint v6.5.0 released
ESLint Blog
HighlightsWe have added a new --env-info CLI option, which provides a lot of information that is useful for GitHub issues.The use-isnan rule supports a new option, enforceForSwitchCase.The indent rule now supports JSXFragment nodes.In addition, many rules that removed comments during autofix have been modified to avoid removing comments. Please open an issue if you find any more cases that need to be fixed.Featuresa7894eb New: add --env-info flag to CLI (#12270) (Kai Cataldo)Enhancements73596cb Update: Add enforceForSwitchCase option to use-isnan (#12106) (Milos Djermanovic)334ca7c Update: no-useless-rename also reports default values (fixes #12301) (#12322) (Kai Cataldo)41bfe91 Update: Fix handling of chained new expressions in new-parens (#12303) (Milos Djermanovic)11ae6fc Update: Fix call, new and member expressions in no-extra-parens (#12302) (Milos Djermanovic)d4f9a16 Update: add support for JSXFragments in indent rule (fixes #12208) (#12210) (Kai Cataldo)Bug Fixesd592a24 Fix: exc
5年前
記事のアイキャッチ画像
ESLint v6.4.0 released
ESLint Blog
HighlightsThree new rules: no-import-assign, prefer-regex-literals, default-param-lastaccessor-pairs and computed-property-spacing rules has been updated with a new option enforceForClassMembersFeatures1c921c6 New: add no-import-assign (fixes #12237) (#12252) (Toru Nagashima)3be04fd New: Add prefer-regex-literals rule (fixes #12238) (#12254) (Milos Djermanovic)0313441 New: add rule default-param-last (fixes #11361) (#12188) (Chiawen Chen)Enhancements540296f Update: enforceForClassMembers option to accessor-pairs (fixes #12063) (#12192) (Milos Djermanovic)d3c2334 Update: flag nested block with declaration as error (#12193) (David Waller)b2498d2 Update: Fix handling of property names in no-self-assign (#12105) (Milos Djermanovic)1ee61b0 Update: enforceForClassMembers computed-property-spacing (fixes #12049) (#12214) (Milos Djermanovic)db2a29b Update: indentation of comment followed by semicolon (fixes #12232) (#12243) (Kai Cataldo)37c0fde Update: Report global Atomics calls in no-obj-cal
5年前
記事のアイキャッチ画像
Indeed donates $10,000 to ESLint
ESLint Blog
We are happy to share that Indeed has donated $10,000 to the ESLint project as part of their FOSS Contributor Fund. The FOSS Contributor Fund is a unique idea, where all Indeed employees may nominate an open source project to receive a one-time donation, and any employee who has contributed to an open source project during that month gets to vote on the nominees. We are honored to be one of the projects that Indeed employees chose to support.“Most JavaScript projects directly or transitively depend on ESLint. An Indeed employee nominated ESLint to receive a donation from the FOSS Contributor Fund, and their colleagues clearly agreed. We’re happy to support the open source technologies that allow us to develop, protect, and maintain the digital infrastructure that supports our products and helps people get jobs.” – Duane O’Brien, Head of Open Source, IndeedWe are grateful to Duane for reaching out to discuss the details of their contribution, and to the employees at Indeed who voted to
5年前
記事のアイキャッチ画像
ESLint v6.3.0 released
ESLint Blog
Highlightseslint --init can automatically configure TypeScript support for ESLint in a new project.The new reportUnusedDisableDirectives config option mirrors the existing --report-unused-disable-directives CLI flag.Features52e2cf5 New: reportUnusedDisableDirectives in config (refs eslint/rfcs#22) (#12151) (Toru Nagashima)4c0b70b New: support TypeScript at config initializer (fixes #11789) (#12172) (Pig Fang)Enhancements020f952 Update: enforceForSequenceExpressions to no-extra-parens (fixes #11916) (#12142) (Milos Djermanovic)Bug Fixesaab1b84 Fix: reset to the default color (#12174) (Ricardo Gobbo de Souza)4009d39 Fix: yoda rule produces invalid autofix with preceding yield (#12166) (Milos Djermanovic)febb660 Fix: no-extra-boolean-cast invalid autofix with yield before negation (#12164) (Milos Djermanovic)197f443 Fix: func-name-matching crash on descriptor-like arguments (#12100) (Milos Djermanovic)644ce33 Fix: no-self-assign false positive with rest and spread in array (#12099) (Milos
5年前
記事のアイキャッチ画像
ESLint v6.2.2 released
ESLint Blog
Documentationb809e72 Docs: Update README team and sponsors (ESLint Jenkins)Dependency Upgrades0e0b784 Upgrade: espree@^6.1.1 (#12158) (Kevin Partington)
5年前
記事のアイキャッチ画像
ESLint v6.2.1 released
ESLint Blog
This release includes a security fix in the eslint-utils package, which is a dependency of ESLint. The security issue affects users that run ESLint on untrusted source code (e.g. servers that lint the user’s project as a service). By taking advantage of a bug in a certain piece of analysis, a user could supply malicious source text that causes arbitrary code to be executed in the linting process.This issue affects versions of eslint-utils between v1.2.0 and v1.4.0.ESLint versions between v5.3.0 and v6.2.0 are potentially vulnerable (their allowed dependencies include vulnerable eslint-utils versions). However, these versions of ESLint can still be used safely if the eslint-utils dependency is updated to the latest version (e.g. by updating eslint-utils in a lockfile, or purging node_modules and reinstalling).ESLint v6.2.1 is not vulnerable to the issue.Documentation4aeeeed Docs: update docs for ecmaVersion 2020 (#12120) (silverwind)6886148 Docs: Add duplicate keys limitation to accesso
5年前
記事のアイキャッチ画像
ESLint v6.2.0 released
ESLint Blog
HighlightsThis release adds support for ES2020 syntax, which includes support for Dynamic Imports and BigInt. This can be enabled using ecmaVersion: 2020 in your configuration file.A new rule, function-call-argument-newline, has been added.Many bug fixes thanks to @mdjermanovic!Featuresafd8012 New: noInlineConfig setting (refs eslint/rfcs#22) (#12091) (Toru Nagashima)8cd00b3 New: function-call-argument-newline (#12024) (finico)Enhancementsfee6acb Update: support bigint and dynamic import (refs #11803) (#11983) (Toru Nagashima)3d12378 Update: Fix accessor-pairs to enforce pairs per property in literals (#12062) (Milos Djermanovic)2dc23b8 Update: fix no-dupe-keys false negatives on empty string names (#12069) (Milos Djermanovic)d642150 Update: Check empty string property names in sort-keys (#12073) (Milos Djermanovic)1aff8fc Update: warn about mixing ternary and logical operators (fixes #11704) (#12001) (Karthik Priyadarshan)fbec99e Update: fix class-methods-use-this false negatives with
5年前
記事のアイキャッチ画像
ESLint v6.1.0 released
ESLint Blog
Enhancementsb974fcb Update: Check computed property keys in no-extra-parens (#11952) (Milos Djermanovic)222d27c Update: Add for-in and for-of checks for props in no-param-reassign (#11941) (Milos Djermanovic)Bug Fixesd08683e Fix: glob processing (fixes #11940) (#11986) (Toru Nagashima)bfcf8b2 Fix: dot-location errors with parenthesized objects (fixes #11868) (#11933) (Milos Djermanovic)79e8d09 Fix: add parens for sequence expr in arrow-body-style (fixes #11917) (#11918) (Pig Fang)e4c450f Fix: no-extra-parens autofix with in in a for-loop init (fixes #11706) (#11848) (Milos Djermanovic)2dafe2d Fix: prefer-const produces invalid autofix (fixes #11699) (#11827) (Milos Djermanovic)cb475fd Fix: Cache file error handling on read-only file system. (fixes #11945) (#11946) (Cuki)6669f78 Fix: --init with Vue.js failed (fixes #11970) (#11985) (Toru Nagashima)1fb3620 Fix: creating of enabledGlobals object without prototype (fixes #11929) (#11935) (finico)19335b8 Fix: actual messageId and expected
5年前
記事のアイキャッチ画像
ESLint v6.0.1 released
ESLint Blog
Bug Fixesb5bde06 Fix: --rulesdir option didn’t work (fixes #11888) (#11890) (Toru Nagashima)13f0418 Fix: improve error message on --print-config (fixes #11874) (#11885) (Toru Nagashima)056c2aa Fix: improve diagnostics for shareable-config-missing errors (#11880) (Teddy Katz)d07f3fa Fix: CLIEngine#getRules() contains plugin rules (fixes #11871) (#11872) (Toru Nagashima)Documentation566b7aa Docs: Update no-confusing-arrow with the new default option (#11886) (Yuping Zuo)21f4a80 Docs: Fix inconsistent linking in migration guide (#11881) (Teddy Katz)f3a0774 Docs: Fix typo in 6.0.0 migration guide (#11870) (Kevin Partington)
5年前
記事のアイキャッチ画像
ESLint v6.0.0 released
ESLint Blog
HighlightsThere are several breaking changes in 6.0.0. We’ve created a migration guide to explain the breaking changes and describe how to upgrade.Configuration using glob patterns now supports extends and nested overridesUsing multiple processors is now supported.The function-paren-newline rule has a new multiline-arguments option.The sort-keys rule now supports a minKeys option.Changes since v6.0.0-rc.0:Bug Fixes5f022bc Fix: no-else-return autofix produces name collisions (fixes #11069) (#11867) (Milos Djermanovic)ded9548 Fix: multiline-comment-style incorrect message (#11864) (golopot)c844c6f Fix: max-len properly ignore trailing comments (fixes #11838) (#11841) (ZYSzys)1b5661a Fix: no-var should not fix variables named ‘let’ (fixes #11830) (#11832) (Milos Djermanovic)81c3823 Fix: require-atomic-updates reports parameters (fixes #11723) (#11774) (Toru Nagashima)Documentationcad074d Docs: Add JSHint W047 compat to no-floating-decimal (#11861) (Timo Tijhof)65faa04 Docs: Clarify prefer
5年前
記事のアイキャッチ画像
ESLint v6.0.0-rc.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.BigInt and dynamic import are at stage 4 (aside from some TC39 formalities), so we have begun to accept PRs to incorporate them into core ESLint rules. The valid-typeof rule now supports BigInt. Please see #11803 to track our progress in fully supporting these newly standardized language features.The sort-keys rule now supports a minKeys option.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you e
5年前
記事のアイキャッチ画像
ESLint v6.0.0-alpha.2 released
ESLint Blog
HighlightsConfiguration using glob patterns now supports extends and nested overridesUsing multiple processors is now supportedInstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideIf you’re upgrading from ESLint v5.x, we recommend looking at the migration guide, which describes the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changes2d32a9e Breaking: stricter rule config validating (fixes #9505) (#11742) (薛定谔的猫)Featuresb5fa149 New: multiple processors support (fixes #11035, fixes #11725) (#11552) (Toru Nagashima)54e6eda New: extends in glob-based config (fixes #8813) (#11554) (Toru Nag
5年前
記事のアイキャッチ画像
ESLint v6.0.0-alpha.1 released
ESLint Blog
HighlightsMost of the highlights of this release are breaking changes, and are discussed further in the migration guide.New breaking changes in this prerelease include:Some config-loading bugs have been fixed. This change involved some refactoring to how config files are processed internally. Please let us know if you encounter any problems relating to configuration in this release.eslint:recommended has been updatedno-redeclare has been made stricterInstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideIf you’re upgrading from ESLint v5.x, we recommend looking at the migration guide, which describes the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide
6年前
記事のアイキャッチ画像
Funding ESLint's Future: An Update
ESLint Blog
Back in February, we announced the creation of the ESLint Collective to raise funds for the ongoing maintenance and development of ESLint. At the time, we were grateful to have both Facebook Open Source and Airbnb as our first two gold sponsors, each donating $1,000 per month.In the past three months, we are happy to share that our monthly donations have reached over $7,000, 35% of the way towards our $20,000 goal. That’s an amazing achievement in such a short amount of time, and we are humbled that so many have reached out to support ESLint.Introducing our latest sponsorsWe are happy to share that the following sponsors have joined the ESLint Collective at the gold sponsor level, donating $1,000 or more per month:GitKraken - $1,100Badoo - $1,000Salesforce - $1,000The following sponsors have joined the ESLint Collective at the silver sponsor level, donating between $500 and $999 per month:Amp Project - $500And the following sponsors have joined the ESLint Collective at the bronze spons
6年前
記事のアイキャッチ画像
ESLint v6.0.0-alpha.0 released
ESLint Blog
HighlightsMost of the highlights of this release are breaking changes, and are discussed further in the migration guide.Non-breaking highlights:The function-paren-newline rule has a new multiline-arguments option.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changes9e49b56 Breaking: upgrade espree to 6.0.0-alpha.0 (fixes #9687) (#11610) (Teddy Katz)ef7801e Breaking: disallow invalid rule defaults in RuleTester (fixes #11473) (#11599) (Teddy Katz)4e7cdca Brea
6年前
記事のアイキャッチ画像
ESLint v5.16.0 released
ESLint Blog
HighlightsFormatters can now use rule metadata in their output! This enhancement was originally described and designed using our RFC process. More information can be found here.A new built-in formatter, json-with-metadata, was created using this new feature. The json-with-metadata formatter is very similar to the json formatter, except that it also includes the rule metadata.Enhancementsbc3e427 Update: pass rule meta to formatters RFC 10 (#11551) (Chris Meyer)Bug Fixesc06d38c Fix: Allow HTML formatter to handle no meta data (#11566) (Ilya Volodin)Documentation87a5c03 Docs: func-style: clarify when allowArrowFunctions is used (#11548) (Oliver Joseph Ash)78358a8 Docs: fix duplicate punctuation in CLI docs (#11528) (Teddy Katz)Dependency Upgradesafe3d25 Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550) (Vernon de Goede)Build Relateddfef227 Build: gensite passes rulesMeta to formatter rendering (#11567) (Kevin Partington)Choresb452f27 Chore: Update README to
6年前
記事のアイキャッチ画像
ESLint v5.15.3 released
ESLint Blog
Bug Fixes71adc66 Fix: avoid moving comments in implicit-arrow-linebreak (fixes #11521) (#11522) (Teddy Katz)Chores1f715a2 Chore: make test-case-property-ordering reasonable (#11511) (Toru Nagashima)
6年前
記事のアイキャッチ画像
ESLint v5.15.2 released
ESLint Blog
Bug Fixes29dbca7 Fix: implicit-arrow-linebreak adds extra characters (fixes #11268) (#11407) (Mark de Dios)a5dae7c Fix: Empty glob pattern incorrectly expands to “/**” (#11476) (Ben Chauvette)Documentationd6c1122 Docs: Add working groups to maintainer guide (#11400) (Nicholas C. Zakas)956e883 Docs: Fix example in no-restricted-modules docs (#11454) (Paul O’Shannessy)2c7431d Docs: fix json schema example dead link (#11498) (kazuya kawaguchi)e7266c2 Docs: Fix invalid JSON in “Specifying Parser Options” (#11492) (Mihira Jayasekera)0756128 Docs: Add visualstudio to formatter list (#11480) (Patrick Eriksson)44de9d7 Docs: Fix typo in func-name-matching rule docs (#11484) (Iulian Onofrei)Dependency Upgrades5d2083f Upgrade: [email protected] (#11513) (Teddy Katz)Build Related5fdb4d3 Build: compile deps to ES5 when generating browser file (fixes #11504) (#11505) (Teddy Katz)06fa165 Build: update CI testing configuration (#11500) (Reece Dunham)34a5382 Build: copy bundled espree to website direc
6年前
記事のアイキャッチ画像
ESLint v5.15.1 released
ESLint Blog
Bug Fixes458053b Fix: avoid creating invalid regex in no-warning-comments (fixes #11471) (#11472) (Teddy Katz)Build Relatedfe1a892 Build: bundle espree (fixes eslint/eslint.github.io#546) (#11467) (薛定谔的猫)
6年前
記事のアイキャッチ画像
ESLint v5.15.0 released
ESLint Blog
HighlightsThe prefer-named-capture-group rule has been added. This rule encourages the use of named capture groups over numbered capture groups.Featuresec59ec0 New: add rule “prefer-named-capture-group” (fixes #11381) (#11392) (Pig Fang)Enhancementsde5cbc5 Update: remove invalid defaults from core rules (fixes #11415) (#11427) (Teddy Katz)Bug Fixes6489518 Fix: no-extra-parens crash when code is “((let))” (#11444) (Teddy Katz)Documentation8f3d717 Docs: Add non-attending TSC member info (#11411) (Nicholas C. Zakas)ce0777d Docs: use more common spelling (#11417) (薛定谔的猫)Dependency Upgradesa44f750 Upgrade: [email protected] (#11461) (Teddy Katz)Build Related4088c6c Build: Remove path.resolve in webpack build (#11462) (Kevin Partington)eb0650b Build: fix linting errors on master (#11428) (Teddy Katz)db0c5e2 Build: switch from browserify to webpack (fixes #11366) (#11398) (Pig Fang)Choresee88475 Chore: add utils for rule tests (#11453) (薛定谔的猫)5018378 Chore: enable require-unicode-regexp on E
6年前
記事のアイキャッチ画像
ESLint v5.14.1 released
ESLint Blog
Bug Fixes1d6e639 Fix: sort-keys throws Error at SpreadElement (fixes #11402) (#11403) (Krist Wongsuphasawat)
6年前
記事のアイキャッチ画像
ESLint v5.14.0 released
ESLint Blog
HighlightsFor clarity configuration of global variables has been enhanced with two additional values readonly and writable. All previous values are still valid.The prefer-destructuring rule is now auto-fixable.Auto-fix was removed from prefer-spread to avoid creating invalid code.--init CLI command has been updated to streamline available options.Featuresa23d197 New: add allowSingleLineBlocks opt. to padded-blocks rule (fixes #7145) (#11243) (richie3366)Enhancements51c4972 Update: Behavior of --init (fixes #11105) (#11332) (Nicholas C. Zakas)550de1e Update: use default keyword in JSON schema (fixes #9929) (#11288) (Pig Fang)983c520 Update: Use ‘readonly’ and ‘writable’ for globals (fixes #11359) (#11384) (Nicholas C. Zakas)3c90dd7 Update: remove prefer-spread autofix (fixes #11330) (#11365) (薛定谔的猫)5eb3121 Update: add fixer for prefer-destructuring (fixes #11151) (#11301) (golopot)533d240 Update: no-shadow-restricted-names lets unassigned vars shadow undefined (#11341) (Teddy Katz)d0e82
6年前
記事のアイキャッチ画像
Funding ESLint's Future
ESLint Blog
June 2019 will mark six years since ESLint was first released. What began as a side project for a very narrow use case has grown into the most popular JavaScript linter in the world, with over 6.5 million npm downloads every week. ESLint is now used by both large companies and individual developers to help find and fix problems with JavaScript code every day. In addition, ESLint has been flexible enough to work with languages derived from JavaScript, such as Flow and TypeScript, and even helps mobile developers by linting React Native.All of this means that ESLint has become an important part of the JavaScript ecosystem. It’s a tool that the JavaScript community depends on and expects to be available, performant, and secure. These expectations are currently being met by an all-volunteer team who spends their free time during lunch breaks, nights, and weekends maintaining ESLint. And while that has worked well for normal maintenance, it’s grown difficult to deal with more involved issue
6年前
記事のアイキャッチ画像
ESLint v5.13.0 released
ESLint Blog
HighlightsConfiguration of globals has been improved with three new options: “off”, “readable”, and “writeable”.“off”: Completely disables a global variable that was previously defined.“readable”: Equivalent to the old false value, “readable” global variables are in scope but cannot be written to.“writeable”: Equivalent to the old true value, “writeable” global variables can be read from and written to.Configurations using the old true/false values will continue to work, but we encourage you to use the newer, more explicit options.Check out the documentation on specifying globals for more details!Features0a3c3ff New: Allow globals to be disabled/configured with strings (fixes #9940) (#11338) (Teddy Katz)Enhancementsb5143bf Update: for-direction detection false positives/negatives (#11254) (Ruben Bridgewater)Bug Fixes5b14ad1 Fix: false positive in no-constant-condition (fixes #11306) (#11308) (Pig Fang)6567c4f Fix: only remove arrow before body in object-shorthand (fixes #11305) (#11307
6年前
記事のアイキャッチ画像
The future of TypeScript on ESLint
ESLint Blog
A couple of weeks ago, the TypeScript team shared their roadmap in which they described formally adopting ESLint in their repo and working to improve TypeScript compatibility for ESLint:LintingSemantic rules in ESLintParity with TSLintSpeed & scalabilityEditor integration for ESLintIn a survey we ran in VS Code a few months back, the most frequent theme we heard from users was that the linting experience left much to be desired. Since part of our team is dedicated to editing experiences in JavaScript, our editor team set out to add support for both TSLint and ESLint. However, we noticed that there were a few architectural issues with the way TSLint rules operate that impacted performance. Fixing TSLint to operate more efficiently would require a different API which would break existing rules (unless an interop API was built like what wotan provides).Meanwhile, ESLint already has the more-performant architecture we’re looking for from a linter. Additionally, different communities of use
6年前
記事のアイキャッチ画像
ESLint v5.12.1 released
ESLint Blog
Bug Fixesaa56247 Fix: avoid loading core rules dynamically from FS in Linter (#11278) (Peter Metz)c403445 Fix: warn constant on RHS of || in no-constant-condition (fixes #11181) (#11253) (Merlin Mason)9194f45 Fix: Manage severity of 1 with TAP reporter (fixes #11110) (#11221) (Gabriel Cousin)Documentation04450bb Docs: clarify process for adding committers (#11272) (Kai Cataldo)3ffcf26 Docs: add @g-plane as committer (#11277) (Kai Cataldo)000f495 Docs: fix example for sort-imports ignoreDeclarationSort (#11242) (Remco Haszing)7c0bf2c Docs: Add npx usage to Getting Started guide (#11249) (eyal0803)da9174e Docs: fixes typo peerDepencies (#11252) (Christian Kühl)9c31625 Docs: Improve custom formatter docs (#11258) (Nicholas C. Zakas)Choreseb5c401 Chore: use meta.messages in some rules (2/4) (refs #9870) (#10773) (薛定谔的猫)
6年前
記事のアイキャッチ画像
ESLint v5.12.0 released
ESLint Blog
HighlightsThe sort-imports rule has a new ignoreDeclarationSort option.Enhancements0d91e7d Update: Add sort-imports ignoreDeclarationSort (fixes #11019) (#11040) (Remco Haszing)Bug Fixesbfff77a Fix: no-param-reassign parameter in ternary operator (fixes #11236) (#11239) (周昊宇)Dependency Upgrades166853d Upgrade: [email protected] (#11220) (薛定谔的猫)258b654 Upgrade: require-uncached renamed to import-fresh (#11066) (薛定谔的猫)Build Relatedf92d6f0 Build: Add karma-chrome-launcher support (#11027) (薛定谔的猫)
6年前
記事のアイキャッチ画像
ESLint v5.11.1 released
ESLint Blog
Bug Fixesde79f10 Fix: handle optional catch bindings in no-useless-catch (#11205) (Colin Ihrig)
6年前
記事のアイキャッチ画像
ESLint v5.11.0 released
ESLint Blog
HighlightsOne new rule has been added: no-useless-catchThe indent rule now supports a VariableDeclarator: "first" option.Featuresb4395f6 New: add option first for VariableDeclarator in indent (fixes #8976) (#11193) (Pig Fang)2b5a602 New: no-useless-catch rule (fixes #11174) (#11198) (Alexander Grasley)Enhancements4242314 Update: handle computed properties in camelcase (fixes #11084) (#11113) (Bence Dányi)Bug Fixes06b3b5b Fix: Account for comments in implicit-arrow-linebreak (#10545) (Mark de Dios)Documentation1009304 Docs: add a note for no-unused-expressions (fixes #11169) (#11192) (Pig Fang)88f99d3 Docs: clarify how to use configs in plugins (#11199) (Kai Cataldo)bcf558b Docs: Clarify the no-unused-vars docs (#11195) (Jed Fox)a470eb7 Docs: Fix no-irregular-whitespace description (#11196) (Jed Fox)8abc8af Docs: Remove a misleading example (#11204) (Bogdan Gradinariu)733d936 Docs: link to JSDoc EOL blogpost in valid-jsdoc and require-jsdoc (#11191) (Nathan Diddle)d5eb108 Docs: Ensure t
6年前
記事のアイキャッチ画像
ESLint v5.10.0 released
ESLint Blog
HighlightsThe padding-line-between-statements rule has new statement types: multiline-const, multiline-let, multiline-var, singleline-const, singleline-let, and singleline-var.The require-jsdoc and valid-jsdoc rules have been deprecated, following our previously announced decision to end support for JSDoc in ESLint.Enhancements4b0f517 Update: single- and multiline const, let, var statements (fixes #10721) (#10919) (Tom Panier)9666aba Update: space-infix-ops reports violating operator (#10934) (Bence Dányi)4490d7a Update: deprecate valid-jsdoc and require-jsdoc (#11145) (Teddy Katz)62fd2b9 Update: Amend keyword-spacing to validate default keywords (#11097) (Bin Ury)3025cdd Update: don’t indent leading semi in line after import (fixes #11082) (#11085) (Pig Fang)Bug Fixesc14f717 Fix: Update all-files-ignored.txt message to be less confusing (#11075) (z.ky)3bf0332 Fix: fix the fixer of lone comma with comments (fixes #10632) (#11154) (Pig Fang)c0a80d0 Fix: Do not strip underscores in camel
6年前
記事のアイキャッチ画像
End-of-Life for Built-in JSDoc Support in ESLint
ESLint Blog
Over the past few years, the ESLint project has grown in size and scope. What originally consisted of a single executable package has grown into a project with multiple packages including several parsers and other utilities. Although the project has grown, the size of the team has not, and as such we’ve had to make some tough decisions about how to continue maintaining the ESLint project as a whole using an all-volunteer team.Current JSDoc Support in ESLintJSDoc support in ESLint currently consists of:Maintaining the Doctrine JSDoc comment parserThe require-jsdoc ruleThe valid-jsdoc ruleThe SourceCode#getJSDocComment() methodTo support JSDoc in ESLint, we had been spending an outsized amount of time maintaining Doctrine and the valid-jsdoc rule as compared to the effort required to maintain the rest of the project. Those two parts, in addition to the require-jsdoc rule and SourceCode#getJSDocComment() are being end-of-lifed beginning today.What End-of-Life MeansEnd-of-life for core JSD
6年前
記事のアイキャッチ画像
ESLint v5.9.0 released
ESLint Blog
HighlightsThe following are the most important changes in this release.The --fix-type optionThis version introduces a new --fix-type option for the command line interface. This option allows you to filter the type of fixes applied when using --fix. You can specify the type of fixes to apply based on the new rule types we’ve assigned to each rule. The three rule types are:problem - the rule flags a potential problem with your code.suggestion - the rule flags something that could be done in a better or preferred way.layout - the rule flags changes limited to whitespace, semicolons, commas, or parentheses.You might find this option useful if you’re using a source code formatter with ESLint, in which case you might want to use --fix-type problem,suggestion to only apply fixes for rules that won’t clash with your formatter.There is also a new fixTypes option that can be passed to the CLIEngine class that implements the same feature for those using the API.Note: Fixes in custom rules will no
6年前
記事のアイキャッチ画像
ESLint v5.8.0 released
ESLint Blog
HighlightsThe Linter API now has a static version property, for consistency with the CLIEngine.version property. (Previously, the version property was only present on instances of Linter rather than Linter itself.)Enhancements3943635 Update: Create Linter.version API (fixes #9271) (#11010) (Nicholas C. Zakas)Bug Fixes9152417 Fix: deprecation warning in RuleTester using Node v11 (#11009) (Teddy Katz)57ef0fd Fix: prefer-const when using destructuring assign (fixes #8308) (#10924) (Nicholas C. Zakas)Documentatione349a03 Docs: Update issue templates to ask for PRs (#11012) (Nicholas C. Zakas)a940cf4 Docs: Mention version for config glob patterns (fixes #8793) (Nicholas C. Zakas)58ff359 Docs: add instructions for npm 2FA (refs #10631) (#10992) (Teddy Katz)Dependency Upgrades2f87bb3 Upgrade: [email protected] (refs #10631) (#10991) (Teddy Katz)Build Related5a31a92 Build: compile espree’s deps to ES5 when generating site (fixes #11014) (#11015) (Teddy Katz)6e1c530 Build: run tests on Node
6年前
記事のアイキャッチ画像
ESLint v5.7.0 released
ESLint Blog
HighlightsThree rules gained new options in this release:padding-line-between-statements has a new iife node type to specifically target immediately-invoked function expression invocations as distinct statements.no-tabs has a new allowIndentationTabs option to permit tabs only for indentation and nowhere else.camelcase has a new allow option that can be configured to individually allow certain non-camelcase identifiers like React’s UNSAFE_componentWillMount.Enhancements6cb63fd Update: Add iife to padding-line-between-statements (fixes #10853) (#10916) (Kevin Partington)5fd1bda Update: no-tabs allowIndentationTabs option (fixes #10256) (#10925) (Kevin Partington)066f7e0 Update: camelcase rule ignoreList added (#10783) (Julien Martin)Bug Fixesd12be69 Fix: no-extra-bind No autofix if arg may have side effect (fixes #10846) (#10918) (Kevin Partington)847372f Fix: no-unused-vars false pos. with markVariableAsUsed (fixes #10952) (#10954) (Roy Sutton)543edfa Fix: Fix error with one-var (fixes
6年前
記事のアイキャッチ画像
ESLint v5.6.1 released
ESLint Blog
Bug Fixes9b26bdb Fix: avoid exponential require-atomic-updates traversal (fixes #10893) (#10894) (Teddy Katz)9432b10 Fix: make separateRequires work in consecutive mode (fixes #10784) (#10886) (Pig Fang)9d52541 Fix: Remove duplicate error message on crash (fixes #8964) (#10865) (Nicholas C. Zakas)Documentationd3f3994 Docs: add information about reporting security issues (#10889) (Teddy Katz)a6ebfd3 Docs: clarify defaultAssignment option, fix no-unneeded-ternary examples (#10874) (CoffeeTableEspresso)4eb9a49 Docs: Update quotes.md (#10862) (The Jared Wilcurt)9159e9b Docs: Update complexity.md (#10867) (Szymon Przybylski)14f4e46 Docs: Use Linter instead of linter in Nodejs API page (#10864) (Nicholas C. Zakas)Dependency Upgradese51868d Upgrade: debug@4 (fixes #10854) (#10887) (薛定谔的猫)Build Relatedcc458f4 Build: fix failing tests on master (#10890) (Teddy Katz)Choresb3e3cb1 Chore: Update debug log name to match filename (#10863) (Nicholas C. Zakas)
6年前
記事のアイキャッチ画像
ESLint v5.6.0 released
ESLint Blog
Enhancementsc5b688e Update: Added generators option to func-names (fixes #9511) (#10697) (Oscar Barrett)Bug Fixes7da36d5 Fix: respect generator function expressions in no-constant-condition (#10827) (Julian Rosse)Chores0a65844 Chore: quote enable avoidEscape option in eslint-config-eslint (#10626) (薛定谔的猫)32f41bd Chore: Add configuration wrapper markdown for the bug report template (#10669) (Iulian Onofrei)
6年前
記事のアイキャッチ画像
ESLint v5.5.0 released
ESLint Blog
Enhancementsb61d2cd Update: max-params to only highlight function header (#10815) (Ian Obermiller)Bug Fixes6e110e6 Fix: camelcase duplicate warning bug (fixes #10801) (#10802) (Julian Rosse)Documentation5103ee7 Docs: Add Brackets integration (#10813) (Jan Pilzer)2824d43 Docs: fix comment placement in a code example (#10799) (Vse Mozhet Byt)80c8598 Docs: gitignore syntax updates (fixes #8139) (#10776) (Gustavo Santana)Dependency Upgrades2b2f11d Upgrade: babel-code-frame to version 7 (#10808) (Rouven Weßling)10690b7 Upgrade: devdeps and deps to latest (#10622) (薛定谔的猫)Chorescb946af Chore: use meta.messages in some rules (1/4) (#10764) (薛定谔的猫)
6年前
記事のアイキャッチ画像
ESLint v5.4.0 released
ESLint Blog
Enhancementsf3d8454 Update: Improve no-extra-parens error message (#10748) (Timo Tijhof)Bug Fixes034690f Fix: no-invalid-meta crashes for non Object values (fixes #10750) (#10753) (Sandeep Kumar Ranka)562a03f Fix: consistent-docs-url crashes if meta.docs is empty (fixes #10722) (#10749) (Sandeep Kumar Ranka)Documentationa70909f Docs: Add jscs-dev.github.io links (#10771) (Gustavo Santana)11a462d Docs: Broken jscs.info URLs (fixes #10732) (#10770) (Gustavo Santana)Chores985567d Chore: rm unused dep string.prototype.matchall (#10756) (薛定谔的猫)6492233 Chore: enable no-prototype-builtins in codebase (fixes #10660) (#10664) (薛定谔的猫)137140f Chore: use eslintrc overrides (#10677) (薛定谔的猫)
6年前
記事のアイキャッチ画像
ESLint v5.3.0 released
ESLint Blog
HighlightsFour new rules have been added:no-misleading-character-class reports multi-code-point characters in regular expression character classes. Using these characters in character classes often results in surprising behavior.require-atomic-updates reports potential race conditions that result from updating values in async or generator functions.no-async-promise-executor reports uses of the Promise constructor that have an async function as the argument. Using an async function in this scenario is not necessary and a potential source of bugs.require-unicode-regexp requires all regular expressions to have the u flag. Regular expressions with the u flag have stricter parsing rules and handle unicode text more sensibly, which is useful to avoid unexpected behavior when writing regular expressions.Features6eb972c New: require-unicode-regexp rule (fixes #9961) (#10698) (Toru Nagashima)2cc3240 New: add no-misleading-character-class (fixes #10049) (#10511) (Toru Nagashima)9e93d46 New: add
6年前
記事のアイキャッチ画像
ESLint v5.2.0 released
ESLint Blog
HighlightsWhen using the --cache flag, the results for files with linting errors are now saved to the cache. This should result in improved performance when using --cache on a codebase with existing linting errors.Enhancements81283d0 Update: Cache files that failed linting (fixes #9948) (#10571) (Kevin Partington)Documentation9f93d5f Docs: Updated Working with Custom Formatters (fixes #9950) (#10592) (Marla Foreman)Dependency Upgrades13cc63e Upgrade: [email protected] (#10619) (Rouven Weßling)761f802 Upgrade: eslint-plugin-node to 7.0.1 (#10612) (Toru Nagashima)Build Relatedc517b2a Build: fix npm run perf failing(fixes #10577) (#10607) (薛定谔的猫)80b296e Build: package.json update for eslint-config-eslint release (ESLint Jenkins)64dfa21 Build: Fix prerelease logic in blog post generation (fixes #10578) (#10581) (Kevin Partington)Choresac77a80 Chore: Fixing a call to Object.assign.apply in Linter (#10629) (Kevin Partington)e596939 Chore: fix redundant equality check (#10617) (Toru Nagashima)9aaf
6年前
記事のアイキャッチ画像
Postmortem for Malicious Packages Published on July 12th, 2018
ESLint Blog
SummaryOn July 12th, 2018, an attacker compromised the npm account of an ESLint maintainer and published malicious versions of the eslint-scope and eslint-config-eslint packages to the npm registry. On installation, the malicious packages downloaded and executed code from pastebin.com which sent the contents of the user’s .npmrc file to the attacker. An .npmrc file typically contains access tokens for publishing to npm.The malicious package versions are [email protected] and [email protected], both of which have been unpublished from npm. The pastebin.com paste linked in these packages has also been taken down.npm has revoked all access tokens issued before 2018-07-12 12:30 UTC. As a result, all access tokens compromised by this attack should no longer be usable.The maintainer whose account was compromised had reused their npm password on several other sites and did not have two-factor authentication enabled on their npm account.We, the ESLint team, are sorry for allowing thi
6年前
記事のアイキャッチ画像
ESLint v5.1.0 released
ESLint Blog
HighlightsThe no-catch-shadow rule has been deprecated in favor of no-shadow.Enhancements143890a46 Update: Adjust grammar of error/warnings fixable (#10546) (Matt Mischuk)b7addf6fe Update: deprecate no-catch-shadow (fixes #10466) (#10526) (Toru Nagashima)Bug Fixesb2df73876 Fix: prefer-object-spread duplicated comma (fixes #10512, fixes #10532) (#10524) (Toru Nagashima)d8c3a25f5 Fix: wrap-regex doesn’t work in some expression(fixes #10573) (#10576) (薛定谔的猫)63f36f783 Fix: sort-keys in an object that contains spread (fixes #10261) (#10495) (katerberg)601a5c4ae Fix: Prefer-const rule crashing on array destructuring (fixes #10520) (#10527) (Michael Mason)02efeac65 Fix: do not fail on nested unknown operators (#10561) (Rubén Norte)e862dc3a8 Fix: Remove autofixer for no-debugger (fixes #10242) (#10509) (Teddy Katz)Documentation114f42ee5 Docs: Clarify option defaults in max-lines-per-function docs (#10569) (Chris Harwood)100f1beb2 Docs: add note about release issues to readme (#10572) (Teddy Ka
6年前
記事のアイキャッチ画像
ESLint v5.0.1 released
ESLint Blog
Bug Fixes196c102 Fix: valid-jsdoc should allow optional returns for async (fixes #10386) (#10480) (Mark Banner)Documentation4c823bd Docs: Fix max-lines-per-function correct code’s max value (#10513) (Rhys Bower)
6年前
記事のアイキャッチ画像
ESLint v5.0.0 released
ESLint Blog
HighlightsThere are several breaking changes in 5.0.0. We’ve created a migration guide to explain the breaking changes and describe how to upgrade.Three new rules have been added:prefer-object-spreadmax-classes-per-filemax-lines-per-functionThe CLIEngine.executeOnFiles API now has a globInputPaths option.The one-var rule is now autofixable.The array-element-newline rule now has a consistent option.The camelcase rule now has an ignoreDestructuring option.The valid-jsdoc rule now has a requireParamType option.The func-name-matching rule now has a considerPropertyDescriptor option.Changes since v5.0.0-rc.0:Features0feedfd New: Added max-lines-per-function rule (fixes #9842) (#10188) (peteward44)Enhancements7a7580b Update: Add considerPropertyDescriptor option to func-name-matching (#9078) (Dieter Luypaert)Bug Fixesf93d6ff Fix: do not fail on unknown operators from custom parsers (fixes #10475) (#10476) (Rubén Norte)05343fd Fix: add parens for yield statement (fixes #10432) (#10468) (Pig F
6年前
記事のアイキャッチ画像
ESLint v5.0.0-rc.0 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo or joining our Gitter channel.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Enhancementsabf400d Update: Add ignoreDestructing op
6年前
記事のアイキャッチ画像
ESLint v5.0.0-alpha.4 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo or joining our Gitter channel.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Features465e615 New: prompt users before installi
6年前
記事のアイキャッチ画像
ESLint v5.0.0-alpha.3 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Two new rules have been added: prefer-object-spread and max-classes-per-fileThe CLIEngine API now supports a globInputPaths option to disable glob resolution when linting files.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changes41f0f6e Breaking: report multiline eslint-disable-line directives (fixes #10334) (#10335) (Teddy Katz)09dde26 Breaking: new object-cu
7年前
記事のアイキャッチ画像
ESLint v5.0.0-alpha.2 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changes02e44a5 Breaking: remove TDZ scopes (fixes #10245) (#10270) (Toru Nagashima)c74933b Breaking: remove extra check in getScope (fixes #10246, fixes #10247) (#10252) (Toru Nagashima)8b7c6ea Breaking: report fatal error for linting nonexistent files (fixes #7390) (#10143) (Teddy Katz)9100819 Breaking: fix plugin
7年前
記事のアイキャッチ画像
ESLint v5.0.0-alpha.1 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo or joining our Gitter channel.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changesb2a48a9 Breaking: stop using fake
7年前
記事のアイキャッチ画像
ESLint v5.0.0-alpha.0 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo or joining our Gitter channel.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.Breaking Changesf4b3af586 Breaking: Upgrade to Es
7年前
記事のアイキャッチ画像
ESLint v4.19.1 released
ESLint Blog
Bug Fixes3ff5d11 Fix: no-invalid-regexp not understand variable for flags (fixes #10112) (#10113) (薛定谔的猫)abc765c Fix: object-curly-newline minProperties w/default export (fixes #10101) (#10103) (Kevin Partington)Documentation6f9e155 Docs: Update ambiguous for…in example for guard-for-in (#10114) (CJ R)Chores0360cc2 Chore: Adding debug logs on successful plugin loads (#10100) (Kevin Partington)a717c5d Chore: Adding log at beginning of unit tests in Makefile.js (#10102) (Kevin Partington)
7年前
記事のアイキャッチ画像
ESLint v4.19.0 released
ESLint Blog
The one-var rule now has a consecutive option.Core rules have been updated to support the new RegExp features introduced in ES2018 (when using the appropriate parser options).Enhancements55a1593 Update: consecutive option for one-var (fixes #4680) (#9994) (薛定谔的猫)2e68be6 Update: give a node at least the indentation of its parent (fixes #9995) (#10054) (Teddy Katz)72ca5b3 Update: Correctly indent JSXText with trailing linebreaks (fixes #9878) (#10055) (Teddy Katz)Bug Fixes8d3814e Fix: false positive about ES2018 RegExp enhancements (fixes #9893) (#10062) (Toru Nagashima)Documentation935f4e4 Docs: Clarify default ignoring of node_modules (#10092) (Matijs Brinkhuis)72ed3db Docs: Wrap Buffer() in backticks in no-buffer-constructor rule description (#10084) (Stephen Edgar)3aded2f Docs: Fix lodash typos, make spacing consistent (#10073) (Josh Smith)66a1e9a Docs: fix possible typo (#10060) (Vse Mozhet Byt)2a4c838 Docs: Update ECMAScript versions in FAQ (#10047) (alberto)Chorese33bb64 Chore: en
7年前
記事のアイキャッチ画像
ESLint v4.18.2 released
ESLint Blog
Bug Fixes6b71fd0 Fix: [email protected], because 4.0.3 needs “ajv”: “^6.0.1” (#10022) (Mathieu Seiler)f6901d0 Fix: remove catastrophic backtracking vulnerability (fixes #10002) (#10019) (Jamie Davis)aea07dc Fix: Make max-len ignoreStrings ignore JSXText (fixes #9954) (#9985) (Rachael Sim)Chores3c697de Chore: fix incorrect comment about linter.verify return value (#10030) (Teddy Katz)9df8653 Chore: refactor parser-loading out of linter.verify (#10028) (Teddy Katz)e4f52ce Chore: Simplify dataflow in linter.verify (#10020) (Teddy Katz)33177cd Chore: make library files non-executable (#10021) (Teddy Katz)558ccba Chore: refactor directive comment processing (#10007) (Teddy Katz)18e15d9 Chore: avoid useless catch clauses that just rethrow errors (#10010) (Teddy Katz)a1c3759 Chore: refactor populating configs with defaults in linter (#10006) (Teddy Katz)
7年前
記事のアイキャッチ画像
ESLint v4.18.1 released
ESLint Blog
Bug Fixesf417506 Fix: ensure no-await-in-loop reports the correct node (fixes #9992) (#9993) (Teddy Katz)Documentation3e99363 Docs: Fixed typo in key-spacing rule doc (#9987) (Jaid)7c2cd70 Docs: deprecate experimentalObjectRestSpread (#9986) (Toru Nagashima)
7年前
記事のアイキャッチ画像
ESLint v4.18.0 released
ESLint Blog
Enhancements0e4ae22 Update: fix indent bug with binary operators/ignoredNodes (fixes #9882) (#9951) (Teddy Katz)47ac478 Update: add named imports and exports for object-curly-newline (#9876) (Nicholas Chua)4a6f22e Update: support eslint-disable-* block comments (fixes #8781) (#9745) (Erin)Bug Fixese8efdd0 Fix: support Rest/Spread Properties (fixes #9885) (#9943) (Toru Nagashima)f012b8c Fix: support Async iteration (fixes #9891) (#9957) (Toru Nagashima)Documentation74fa253 Docs: Clarify no-mixed-operators options (fixes #9962) (#9964) (Ivan Hayes)426868f Docs: clean up key-spacing docs (fixes #9900) (#9963) (Abid Uzair)777283b Docs: Propose fix typo for function (#9965) (John Eismeier)bf3d494 Docs: Fix typo in max-len ignorePattern example. (#9956) (Tim Martin)d64fbb4 Docs: fix typo in prefer-destructuring.md example (#9930) (Vse Mozhet Byt)Chores70f22f3 Chore: Apply memoization to config creation within glob utils (#9944) (Kenton Jacobsen)f8d343f Chore: Fix default issue template (#994
7年前
記事のアイキャッチ画像
ESLint v4.17.0 released
ESLint Blog
HighlightsA new multiline option has been added to the padding-line-between-statements rule.Enhancements1da1ada Update: Add “multiline” type to padding-line-between-statements (#8668) (Matthew Bennett)dc80487 Update: space-unary-ops uses astUtils.canTokensBeAdjacent (fixes #9907) (#9906) (Kevin Partington)Bug Fixesd20f6b4 Fix: Typo in error message when running npm (#9866) (Maciej Kasprzyk)Documentation1aa1970 Docs: remove outdated rule naming convention (#9925) (Teddy Katz)3afaff6 Docs: Add prefer-destructuring variable reassignment example (#9873) (LePirlouit)51ec6a7 Docs: Use GitHub Multiple PR/Issue templates (#9911) (Kai Cataldo)084351b Docs: Fix the messageId example (fixes #9889) (#9892) (Jed Fox)9cbb487 Docs: Mention the globals key in the no-undef docs (#9867) (Dan Dascalescu)Choresbb213dc Chore: Use messageIds in some of the core rules (#9648) (Jed Fox)
7年前
記事のアイキャッチ画像
ESLint v4.16.0 released
ESLint Blog
HighlightsThe comma-style rule now supports a NewExpression option.The valid-jsdoc rule can now be autofixed in some cases, and its error locations are more precise.The allowMultiplePropertiesPerLine option in the object-property-newline rule has been renamed to allowAllPropertiesOnSameLine to more clearly convey what the option does. allowMultiplePropertiesPerLine still works, but has been deprecated.Enhancementse26a25f Update: allow continue instead of if wrap in guard-for-in (fixes #7567) (#9796) (Michael Ficarra)af043eb Update: Add NewExpression support to comma-style (#9591) (Frazer McLean)1d61930 Update: use doctrine range information in valid-jsdoc (#9831) (Teddy Katz)133336e Update: fix indent behavior on template literal arguments (fixes #9061) (#9820) (Teddy Katz)add1e70 Update: fix indent bug on comments in ternary expressions (fixes #9729) (#9818) (Teddy Katz)2cf4522 Update: Rename and deprecate object-property-newline option (#9570) (Jonathan Pool)Bug Fixes13bcf3c Fix: Rem
7年前
記事のアイキャッチ画像
ESLint v4.15.0 released
ESLint Blog
HighlightsNew APIsCLIEngine now has a getRules() method. This is useful for integrations that need to look at rules’ metadata programmatically without knowing what rules might have been defined by plugins.Rules now support messages metadata and messageId report parameters, including full support in RuleTester. This lets rule developers use messageIds in their rule tests and avoid needing to track report message changes in both the rule implementation and the corresponding test file. In addition, this is the first step towards core support for rule message localization.New rule optionsThe indent rule now has an ignoreComments option. This allows users to opt out of indentation checks for comments if project style rules require that comments be indented in a different manner.Features6ab04b5 New: Add context.report({ messageId }) (fixes #6740) (#9165) (Jed Fox)65f0176 New: CLIEngine#getRules() (refs #6582) (#9782) (Patrick McElhaney)Enhancementsc64195f Update: More detailed assert message
7年前
記事のアイキャッチ画像
ESLint v4.14.0 released
ESLint Blog
HighlightsParsers can now provide custom scope analysis hooks to ESLint, which should allow for easier integration when parsing non-standard syntax. For more information see our documentation.Featuresae51eb2 New: Add allowImplicit option to array-callback-return (fixes #8539) (#9344) (James C. Davis)Enhancementsbe2f57e Update: support separate requires in one-var. (fixes #6175) (#9441) (薛定谔的猫)75c7419 Update: Logical-and is counted in complexity rule (fixes #8535) (#9754) (Kevin Partington)1c2aafd Update: Improve parser integrations (fixes #8392) (#8755) (Toru Nagashima)Bug Fixes43d4ba8 Fix: false positive on rulelines-between-class-members (fixes #9665) (#9680) (sakabar)Documentation370d614 Docs: Fix typos (#9751) (Jed Fox)eb4b1e0 Docs: reintroduce misspelling in valid-typeof example (#9753) (Teddy Katz)e9d5dfd Docs: improve no-extra-parens formatting (#9747) (Rich Trott)f252c19 Docs: Make the lint message source property a little more subtle (#9735) (Jed Fox)5a5c23c Docs: fix the link
7年前
記事のアイキャッチ画像
ESLint v4.13.1 released
ESLint Blog
Bug Fixesb72dc83 Fix: eol-last allow empty-string to always pass (refs #9534) (#9696) (Kevin Partington)d80aa7c Fix: camelcase destructure leading/trailing underscore (fixes #9700) (#9701) (Kevin Partington)Documentationd49d9d0 Docs: Add missing period to the README (#9702) (Kevin Partington)Chores4564fe0 Chore: no-invalid-meta crash if no export assignment (refs #9534) (#9698) (Kevin Partington)
7年前
記事のアイキャッチ画像
ESLint v4.13.0 released
ESLint Blog
HighlightsThis release updates camelcase rule to handle destructuring by default, which might result in more user-visible errors.Enhancements256481b Update: update handling of destructuring in camelcase (fixes #8511) (#9468) (Erin)Documentationd067ae1 Docs: Don’t use undocumented array-style configuration for max-len (#9690) (Jed Fox)cdb1488 Docs: Adds an example with try/catch. (#9672) (Jaap Taal)Chores1ad3091 Chore: fix test-suite to work with node master (#9688) (Myles Borins)
7年前
記事のアイキャッチ画像
ESLint v4.12.1 released
ESLint Blog
Bug Fixes1e362a0 Revert “Fix: Use XML 1.1 on XML formatters (fixes #9607) (#9608)” (#9667) (Kevin Partington)
7年前
記事のアイキャッチ画像
ESLint v4.12.0 released
ESLint Blog
HighlightsNew RulesWe’ve added 1 new rule with this release:implicit-arrow-linebreakAutofixable RulesWe’ve added autofix capabilities to one rule: sort-vars. At present, it will only sort variables with no initial value or a literal initial value, in order to avoid potentially changing the order of function calls.New Node.js APIsWe’ve added a new Node.js API:Linter.defineParserThis API is useful when you are working with an instance of Linter and need to define a custom parser at runtime.Features28c9c8e New: add a Linter#defineParser function (#9321) (Ives van Hoorne)4118f14 New: Adds implicit-arrow-linebreak rule (refs #9510) (#9629) (Sharmila Jesupaul)Enhancements5619910 Update: Add autofix for sort-vars (#9496) (Trevin Hofmann)71eedbf Update: add beforeStatementContinuationChars to semi (fixes #9521) (#9594) (Toru Nagashima)0cf081e Update: add importNames option to no-restricted-imports (#9506) (Benjamin R Gibson)Bug Fixes208fb0f Fix: Use XML 1.1 on XML formatters (fixes #9607) (#96
7年前
記事のアイキャッチ画像
ESLint v4.11.0 released
ESLint Blog
Highlightsnpm installed formatters can now be specified with or without the package name’s eslint-formatter- prefix. Example:npm install eslint-formatter-prettyeslint -f pretty file.js// equivalent:eslint -f eslint-formatter-pretty file.jsEnhancements4d7d7ab Update: Resolve npm installed formatters (#5900) (#9464) (Tom Erik Støwer)Bug Fixes7e3bf6a Fix: edge-cases of semi-style (#9560) (Toru Nagashima)e5a37ce Fix: object-curly-newline for flow code (#9458) (Tiddo Langerak)b7c5b19 Fix: Correct [object Object] output of error.data. (#9561) (Jonathan Pool)accc490 Fix: Files with no failures get “passing” testcase (#9547) (Samuel Levy)a9606a3 Fix: invalid tests with super (fixes #9539) (#9545) (Teddy Katz)Documentationd4557a6 Docs: disallow use of the comma operator using no-restricted-syntax (#9585) (薛定谔的猫)6672fae Docs: Fixed a typo on lines-between-class-members doc (#9603) (Moinul Hossain)2542f04 Docs: Add missing options for lines-around-comment (#9589) (Clément Fiorio)51c8cf0 Docs: Dis
7年前
記事のアイキャッチ画像
ESLint v4.10.0 released
ESLint Blog
Enhancementsebb530d Update: Don’t ignore comments (no-trailing-spaces) (#9416) (Chris van Marle)Bug Fixesbb6e60a Fix: Improve the doc for no-restricted-modules rule (fixes #9437) (#9495) (vibss2397)d80b9d0 Fix: no-var don’t fix globals (fixes #9520) (#9525) (Toru Nagashima)b8aa071 Fix: allow linting the empty string from stdin (fixes #9515) (#9517) (Teddy Katz)2fa64b7 Fix: should not convert non-consecutive line comments to a single blo… (#9475) (薛定谔的猫)9725146 Fix: multiline-comment-style fix produces invalid code (fixes #9461). (#9463) (薛定谔的猫)b12cff8 Fix: Expected order of jsdoc tags (fixes #9412) (#9451) (Orlando Wenzinger)8768b2d Fix: multiline-comment-style autofixer added trailing space (#9454) (Teddy Katz)e830aa1 Fix: multiline-comment-style reports block comments followed by code (#9450) (Teddy Katz)eb8cfb1 Fix: change err report in constant condition (fixes #9398) (#9436) (Victor Hom)Documentationc529de9 Docs: Amend rule document to correct and complete it (refs #6251). (#9498)
7年前
記事のアイキャッチ画像
ESLint v4.9.0 released
ESLint Blog
HighlightsWe’ve added 2 new rules with this release:multiline-comment-stylelines-between-class-membersWe also added new CLI option --fix-dry-run. This option will allow you to apply fixes without writing them to the disk.Features8eb4aae New: multiline-comment-style rule (fixes #8320) (#9389) (薛定谔的猫)ee99876 New: lines-between-class-members rule (fixes #5949) (#9141) (薛定谔的猫)4567ab1 New: Add the fix-dry-run flag (fixes #9076) (#9073) (Rafał Ruciński)Enhancements2247efa Update: Add FunctionExpression to require-jsdoc (fixes #5867) (#9395) (Kai Cataldo)b02fbb6 Update: custom messages for no-restricted-* (refs #8400) (Maja Wichrowska)6767857 Update: fix ignored nodes in indent rule when using tabs (fixes #9392) (#9393) (Robin Houston)786cc73 Update: Add “consistent” option to array-bracket-newline (fixes #9136) (#9206) (Ethan Rutherford)1167638 Update: add allowElseIf option to no-else-return (fixes #9228) (#9229) (Thomas Grainger)62a323c Fix: Add class options for lines-around-comment (fixe
7年前
記事のアイキャッチ画像
ESLint v4.8.0 released
ESLint Blog
Highlights–report-unused-disable-directivesThis release includes a new CLI option that, when on, reports unused eslint-disable directives! Running this periodically will ensure that all eslint-disable comments are still relevant and up to date.Please see the documentation for more information.Features3f2b908 New: add option to report unused eslint-disable directives (fixes #9249) (#9250) (Teddy Katz)Bug Fixesff2be59 Fix: dot notation rule failing to catch string template (fixes #9350) (#9357) (Phil Quinn)06efe87 Fix: Add meta element with charset attribute. (#9365) (H1Gdev)1c6bc67 Fix: special EventEmitter keys leak information about other rules (#9328) (Teddy Katz)38d0cb2 Fix: fix wrong code-path about try-for-in (fixes #8848) (#9348) (Toru Nagashima)434d9e2 Fix: Invalid font-size property value issue. (#9341) (H1Gdev)Documentationcef6f8c Docs: remove line about removing rules from semver policy (#9367) (Teddy Katz)458ca67 Docs: update architecture page (fixes #9337) (#9345) (Victor H
7年前
記事のアイキャッチ画像
ESLint v4.7.2 released
ESLint Blog
Bug Fixes4f87732 Fix: Revert setting node.parent early (fixes #9331) (#9336) (Teddy Katz)
7年前
記事のアイキャッチ画像
ESLint v4.7.1 released
ESLint Blog
Bug Fixes08656db Fix: Handle nested disable directive correctly (fixes #9318) (#9322) (Gyandeep Singh)
7年前
記事のアイキャッチ画像
ESLint v4.7.0 released
ESLint Blog
Highlightsnewline-per-chained-call supports autofix.Processor plugins can now autofix code.To support autofix in processor plugins, developers can signal support by setting supportsAutofix: true and update the postprocess method to transform fix ranges in reported problems.This is explained fully in the Processors documentation.Enhancements1488b51 Update: run rules after node.parent is already set (fixes #9122) (#9283) (Teddy Katz)ce1f084 Update: fix MemberExpression handling in no-extra-parens (fixes #9156) (jackyho112)0c720a3 Update: allow autofixing when using processors (fixes #7510) (#9090) (Teddy Katz)f12def6 Update: indent flatTernary option to handle return (fixes #9285) (#9296) (Teddy Katz)2731f94 Update: make newline-per-chained-call fixable (#9149) (João Granado)a32ec36 Update: refactor eslint-disable comment processing (#9216) (Teddy Katz)Bug Fixese220687 Fix: remove autofix for var undef inits (fixes #9231) (#9288) (Victor Hom)7685fed Fix: IIFE and arrow functions in no-in
7年前
記事のアイキャッチ画像
ESLint v4.6.1 released
ESLint Blog
Bug Fixescb74b87 Fix: avoid adding globals when an env is used with false (fixes #9202) (#9203) (Teddy Katz)Documentationf9b7544 Docs: Correct a typo in generator-star-spacing documentation (#9205) (Ethan Rutherford)Build Relatedbdec46d Build: avoid process leak when generating website (#9217) (Teddy Katz)e5c5e83 Build: Fixing issue with docs generation (Fixes #9199) (#9200) (Ilya Volodin)
7年前
記事のアイキャッチ画像
ESLint v4.6.0 released
ESLint Blog
HighlightsOne new rule has been added: function-paren-newlineThe generator-star-spacing rule is now configurable by function type.Features0e09973 New: function-paren-newline rule (fixes #6074) (#8102) (Teddy Katz)Enhancements6becf91 Update: add eslint version to error output. (fixes #9037) (#9071) (薛定谔的猫)2db356b Update: no-unused-vars Improve message to include the allowed patterns (#9176) (Eli White)8fbaf0a Update: Add configurability to generator-star-spacing (#8985) (Ethan Rutherford)Bug Fixes1bbac51 Fix: avoid breaking eslint-plugin-eslint-comments (fixes #9193) (#9196) (Teddy Katz)3e8b70a Fix: off-by-one error in eslint-disable comment checking (#9195) (Teddy Katz)af4ad60 Fix: Handle error when running init without npm (#9169) (Gabriel Aumala)5ab0434 Fix: indent crash on sparse arrays with “off” option (fixes #9157) (#9166) (Teddy Katz)d6e436f Fix: no-extra-parens reported some parenthesized IIFEs (fixes #9140) (#9158) (Teddy Katz)Documentation56dd769 Docs: fix link format in pref
7年前
記事のアイキャッチ画像
ESLint v4.5.0 released
ESLint Blog
HighlightsThe indent rule can now be configured to ignore the indentation of specific types of syntax, using the ignoredNodes option. This can be useful if you disagree with some of the indentation choices made by the indent rule; instead of disabling the rule entirely when this happens, you can now configure it to avoid checking indentation for the specific cases that you want it to ignore.Enhancementsdecdd2c Update: allow arbitrary nodes to be ignored in indent (fixes #8594) (#9105) (Teddy Katz)79062f3 Update: fix indentation of multiline new.target expressions (#9116) (Teddy Katz)bd09cd5 Update: avoid requiring NaN spaces of indentation (fixes #9083) (#9085) (Teddy Katz)Bug Fixesa4f53ba Fix: Include files with no messages in junit results (#9093) (#9094) (Sean DuBois)f8add8f Fix: don’t autofix with linter.verifyAndFix when fix: false is used (#9098) (Teddy Katz)Documentation6ef734a Docs: add missing word in processor documentation (#9106) (Teddy Katz)77bcee4 Docs: update instruction
7年前
記事のアイキャッチ画像
ESLint v4.4.1 released
ESLint Blog
Bug Fixesec93614 Fix: no-multi-spaces to avoid reporting consecutive tabs (fixes #9079) (#9087) (Teddy Katz)
7年前
記事のアイキャッチ画像
ESLint v4.4.0 released
ESLint Blog
HighlightsInitial support for ECMAScript 2018Because ECMAScript 2018 is still under development, we are implementing features as they are finalized. This release includes the following:Invalid escape sequences in tagged template literalsEnhancements62911e4 Update: Add ImportDeclaration option to indent rule (#8955) (David Irvine)7247b6c Update: handle indentation of custom destructuring syntax (fixes #8990) (#9027) (Teddy Katz)3d020b9 Update: emit a warning for ecmaFeatures rather than throwing an error (#8974) (Teddy Katz)Bug Fixesb3e4598 Fix: clarify AST and don’t use node.start/node.end (fixes #8956) (#8984) (Toru Nagashima)78a85e0 Fix: no-extra-parens incorrectly reports async function expressions (#9035) (薛定谔的猫)c794f86 Fix: getter-return reporting method named ‘get’ (fixes #8919) (#9004) (薛定谔的猫)5ab282f Fix: Print error message in bin/eslint.js (fixes #9011) (#9041) (Victor Hom)cdb82f2 Fix: padding-line-between-statements crash on semicolons after blocks (#8748) (Alexander Madyanki
7年前
記事のアイキャッチ画像
ESLint v4.3.0 released
ESLint Blog
Enhancements91dccdf Update: support more options in prefer-destructuring (#8796) (Victor Hom)3bebcfd Update: Support generator yields in no constant condition (#8762) (Victor Hom)e639358 Update: add question to confirm downgrade (fixes #8870) (#8911) (Toru Nagashima)3c231fa Update: add enforceInMethodNames to no-underscore-dangle (fixes #7065) (#7234) (Gabriele Petronella)128591f Update: prefer-numeric-literals warns Number.parseInt (fixes #8913) (#8929) (Kevin Partington)fb8005d Update: no-restricted-globals custom error messages (fixes #8315) (#8932) (Kevin Partington)1ea3723 Update: fix indentation of parenthesized MemberExpressions (fixes #8924) (#8928) (Teddy Katz)9abc6f7 Update: fix BinaryExpression indentation edge case (fixes #8914) (#8930) (Teddy Katz)Bug Fixes96df8c9 Fix: Handle fixing objects containing comments (fixes #8484) (#8944) (Brian Schemp)a5fd101 Fix: duplicated error message if a crash occurs (fixes #8964) (#8965) (Teddy Katz)55bc35d Fix: Avoid shell mangling durin
7年前
記事のアイキャッチ画像
ESLint v4.2.0 released
ESLint Blog
Highlightslinter.verifyAndFix can now accept a filter function for fixesWhen using the Node.js API to autofix code, it’s sometimes undesirable to autofix every problem at once. For example, a user might want to avoid fixing problems reported by particular rule, or a tool might want to only fix one problem at a time. You can now pass an object like { fix: message => /* ... */ } to the third argument of linter.verifyAndFix, or to the CLIEngine constructor. If the fix function returns true, a fix is applied – otherwise, a fix is not applied. eslint-nibble uses this feature to autofix individual rules, or only autofix errors rather than warnings.Also see: documentationThe getter-return rule has been added.The no-sync rule now has a boolean allowAtRootLevel option to allow sync function calls at the top level of a file.The multiline-ternary rule now has an always-multiline option.Featuresc693be5 New: Allow passing a function as fix option (fixes #8039) (#8730) (Ian VanSchooten)8698a92 New:
7年前
記事のアイキャッチ画像
ESLint v4.1.1 released
ESLint Blog
Bug Fixesf307aa0 Fix: ensure configs from a plugin are cached separately (fixes #8792) (#8798) (Teddy Katz)0d041e7 Fix: avoid crashing when using baseConfig with extends (fixes #8791) (#8797) (Teddy Katz)Documentation8b48ae8 Docs: Add doc on parser services (fixes #8390) (#8795) (Victor Hom)Chores03213bb Chore: improve comment explanation of indent internal functions (#8800) (Teddy Katz)d2e88ed Chore: Fix misleading comment in ConfigCache.js (#8799) (Teddy Katz)
7年前
記事のアイキャッチ画像
ESLint v4.1.0 released
ESLint Blog
HighlightsGlob-based configurationPreviously, it was not possible to use different ESLint configurations for two different files in the same directory. For example, projects that place test files in the same directory as the corresponding source files were unable to use different ESLint configurations for the test files. Adding support for this has been one of our most requested features.This release adds support for glob-based configuration via an overrides key in a config file, which can be used to apply a configuration to specific globs. For example, you can now enable the mocha environment on only test files, with the following config:module.exports = { rules: { // ... the rest of your config (applied to all files) }, overrides: [ { files: ["foo/**/*.spec.js", "bar/**/*.spec.js"], // Override config (only applied to files that match the given globs) env: { mocha: true } } ]};For full details, see the documentation.Ignoring files from package.jsonIt’s common for users to use an .esl
7年前
記事のアイキャッチ画像
ESLint v4.0.0 released
ESLint Blog
HighlightsThere are several breaking changes in 4.0.0. We’ve created a migration guide to explain the breaking changes and describe how to upgrade.Seven new rules have been added:array-element-newlinesemi-stylepadding-line-between-statementsfor-directionswitch-colon-spacingarray-bracket-newlineno-buffer-constructorTwo rules are now autofixable with the --fix flag:no-debuggerno-confusing-arrowThree rules have been deprecated in favor of the new padding-line-between-statements rule:lines-around-directivenewline-after-varnewline-before-returnThree new utility methods have been added to the SourceCode API, and SourceCode#getComments has been deprecated.A new option has been added to the object-curly-newline rule.Changes since v4.0.0-rc.0:Enhancements34c4020 Update: Add support for parens on left side for-loops (fixes: #8393) (#8679) (Victor Hom)Bug Fixes3da7b5e Fix: Semi-Style only check for comments when tokens exist (fixes #8696) (#8697) (Reyad Attiyat)3cfe9ee Fix: Add space between asyn
7年前
記事のアイキャッチ画像
ESLint v4.0.0-rc.0 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo or joining our Gitter channel.HighlightsIf you’re upgrading from 3.x, see the migration guide.One new rule was added in this release:array-element-newlineOne rule gained support for --fix:no-debuggerFeatures7ebd9d6f New: array-element-newline rule (fixes #6075) (#8375) (Jan Peer Stöcklmair)Enhancements0058b0f8 Update: add --fix to no-debugger (#8660) (薛定谔的猫)c4ac969c Update: fix parenthesized ternary expression indentation (fixes #8637) (#8649) (Teddy Katz)Bug Fixes95248336 Fix: Don’t check object destructing in integer property (fixes #8654) (#8657) (flowmemo)d0e9fd2d Fix: Config merge to correctly account for extends (fixes #8193) (#8636) (Gyandeep Singh)Documentationb4daa225 Docs: Note to --fix option for strict rule (#8680) (Vitaliy Potapov
7年前
記事のアイキャッチ画像
ESLint v4.0.0-beta.0 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo or joining our Gitter channel.HighlightsIf you’re upgrading from 3.x, see the migration guide.Four new rules have been added in this release:semi-stylepadding-line-between-statementsfor-directionswitch-colon-spacingPreviously, ESLint’s Node.js API exposed a mutable eslint.linter object which could be used to lint text. This could cause problems if two unrelated modules were using eslint.linter at the same time, because they might both mutate it and interfere with each other. To resolve this, ESLint now exposes an eslint.Linter constructor, which can be used to create mutable linter instances. We recommend that integrations switch to using eslint.Linter rather than eslint.linter.Three rules have been deprecated in favor of the new padding-line-
8年前
記事のアイキャッチ画像
ESLint v4.0.0-alpha.2 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo or joining our Gitter channel.HighlightsESLint will now validate .eslintrc.* files for unknown propertiesBreaking Changes734846b Breaking: validate eslintrc properties (fixes #8213) (#8295) (alberto)Enhancements74ab344 Update: check allman-style blocks correctly in indent rule (fixes #8493) (#8499) (Teddy Katz)f6256d4 Update: no-extend-native checks global scope refs only (fixes #8461) (#8528) (Kevin Partington)99c56d5 Update: handle multiline parents consistently in indent (fixes #8455) (#8498) (Teddy Katz)cf940c6 Update: indent from tokens in import statements (fixes #8438) (#8466) (Teddy Katz)d49acc3 Update: fix no-self-compare false negative on non-literals (fixes #7677) (#8492) (Teddy Katz)Bug Fixes0a9a90f Fix: max-len doesn’t allow comme
8年前
記事のアイキャッチ画像
ESLint v4.0.0-alpha.1 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo or joining our Gitter channel.HighlightsThe array-callback-return rule was added to eslint:recommended in the last prerelease, but it has been removed from eslint:recommended in this prerelease due to false positives that would occur when using methods in a few popular libraries. As a result, this rule will not be in eslint:recommended for 4.0.0.Three new utility methods have been added to the SourceCode API, and SourceCode#getComments has been deprecated.One new rule has been added: array-bracket-newline.The no-confusing-arrow rule can now be autofixed.The object-curly-newline rule has a new option.Breaking Changesfac53890 Breaking: Remove array-callback-return from recommended (fixes #8428) (#8433) (Kai Cataldo)Features7bc6fe0a New: array-br
8年前
記事のアイキャッチ画像
ESLint v4.0.0-alpha.0 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo or joining our Gitter channel.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.New RulesThere is one new rule in this release:no-buffer-co
8年前
記事のアイキャッチ画像
ESLint v3.19.0 released
ESLint Blog
HighlightsBuilding on the release of AST selectors in v3.18.0, no-restricted-syntax now supports custom error messages:{ "rules": { "no-restricted-syntax": [ "error", { "selector": "CallExpression[callee.name='setTimeout'][arguments.length!=2]", "message": "setTimeout must always be invoked with two arguments." } ] }}Autofix is now more reliable thanks to nine individual fixes in this release.Enhancements91baed4 Update: allow custom messages in no-restricted-syntax (fixes #8298) (#8357) (Vitor Balocco)Bug Fixese09132f Fix: no-extra-parens false positive with exports and object literals (#8359) (Teddy Katz)35c93e6 Fix: prevent space-before-function-paren from checking type annotations (#8349) (Teddy Katz)3342e9f Fix: don’t modify operator precedence in operator-assignment autofixer (#8358) (Teddy Katz)155424c Fix: ignore empty path in patterns (fixes #8362) (#8364) (alberto)27616a8 Fix: prefer-const false positive with object spread (fixes #8187) (#8297) (Vitor Balocco)1b1046b Fix: don’
8年前
記事のアイキャッチ画像
ESLint v3.18.0 released
ESLint Blog
HighlightsThis release adds support for AST selectors. AST selectors can describe syntax patterns very precisely, using a similar syntax to CSS selectors. Selectors can be used to:simplify the implementation of custom rules.disallow particular syntax patterns in a codebase using the no-restricted-syntax rule.For example, suppose you want to disallow calls to Mocha’s xdescribe function in your codebase. Previously, it was not possible to do this without writing a custom rule. However, now you can configure the no-restricted-syntax rule with a selector:{ "rules": { "no-restricted-syntax": [ "error", "CallExpression[callee.name='xdescribe']" ] }}Selectors can give you a lot of control over specific patterns in your code, without needing to write a custom rule for each pattern.For more details, see the selector documentation.Features1b678a6 New: allow rules to listen for AST selectors (fixes #5407) (#7833) (Teddy Katz)Enhancements23eca51 Update: Add allowTaggedTemplates to no-unused-expres
8年前
記事のアイキャッチ画像
ESLint v3.17.1 released
ESLint Blog
Bug Fixesf713f11 Fix: nonblock-statement-body-position multiline error (fixes #8202) (#8203) (Teddy Katz)41e3d9c Fix: operator-assignment with parenthesized expression (fixes #8190) (#8197) (alberto)Build Relatedf8c8e6e Build: change mock-fs path without SSH (fixes #8207) (#8208) (Toru Nagashima)Chores5e3bca7 Chore: add eslint-plugin-eslint-plugin (#8198) (Teddy Katz)580da36 Chore: add missing output property to tests (#8195) (alberto)
8年前
記事のアイキャッチ画像
ESLint v3.17.0 released
ESLint Blog
HighlightsTwo new rules were added:no-compare-neg-zerononblock-statement-body-positionTwo new methods were added to the SourceCode API for rules:getLocFromIndex and getIndexFromLocTwo enhancements were made to the RuleTester utility:Error message assertions can now be regular expressions.output for a test case can be set to null to assert that the case is not autofixed.Featuresdad20ad New: add SourceCode#getLocFromIndex and #getIndexFromLoc (fixes #8073) (#8158) (Teddy Katz)20daea5 New: no-compare-neg-zero rule (#8091) (薛定谔的猫)287e882 New: nonblock-statement-body-position rule (fixes #6067) (#8108) (Teddy Katz)7ff42e8 New: Allow regexes in RuleTester (fixes #7837) (#8115) (Daniel Lo Nigro)Enhancements4fdf6d7 Update: deprecate applyDefaultPatterns in line-comment-position (#8183) (alberto)bf4d8cf Update: ignore eslint comments in lines-arount-comment (fixes #4345) (#8155) (alberto)18a519f Update: let RuleTester cases assert that no autofix occurs (fixes #8157) (#8163) (Teddy Katz)ca1694b
8年前
記事のアイキャッチ画像
ESLint v3.16.1 released
ESLint Blog
Bug Fixesff8a80c Fix: duplicated autofix output for inverted fix ranges (fixes #8116) (#8117) (Teddy Katz)Documentationa421897 Docs: fix typo in arrow-parens.md (#8132) (Will Chen)9fa2559 Docs: Add missing quotes in key-spacing rule (#8121) (Glenn Reyes)Build Relatedf3a6ced Build: package.json update for eslint-config-eslint release (ESLint Jenkins)Chores22d7fbf Chore: fix invalid redeclared variables in tests (#8130) (Teddy Katz)8d95598 Chore: fix output assertion typos in rule tests (#8129) (Teddy Katz)
8年前
記事のアイキャッチ画像
ESLint v3.16.0 released
ESLint Blog
HighlightsThis is a summary of some of the notable changes in this version of ESLint.Updated Token Iterator MethodsThis release includes an exciting update for rule authors! Many of the token iterator methods provided by sourceCode have been updated with a new options parameter. Some highlights:includeCommentsMany of these methods can now include comments in the returned results using the { includeComments: true } option. The following methods are now deprecated:sourceCode.getTokenOrCommentBefore(node)sourceCode.getTokenOrCommentAfter(node)Instead, please use the following, respectively:sourceCode.getTokenBefore(node, { includeComments: true })sourceCode.getTokenAfter(node, { includeComments: true })filterThe filter option is a function that will filter the returned tokens. This allows for finding a specific token by type or value without having to create a loop.For instance, the following:let token = sourceCode.getTokenAfter(node);while (token.type !== "Keyword") { token = sourceCode.
8年前
記事のアイキャッチ画像
ESLint v3.15.0 released
ESLint Blog
HighlightsThis is a summary of some of the notable changes in this version of ESLint.New RulesOne new rule was added:template-tag-spacingFeatures09546a4 New: template-tag-spacing rule (fixes #7631) (#7913) (Jonathan Wilsson)Enhancementsc59a0ba Update: add ignoreRestSiblings option to no-unused-vars (#7968) (Zack Argyle)fbd7c13 Update: ensure operator-assignment handles exponentiation operators (#7970) (Teddy Katz)c5066ce Update: add “variables” option to no-use-before-define (fixes #7111) (#7948) (Teddy Katz)Bug Fixesf2a3580 Fix: no-extra-parens incorrect precedence (fixes #7978) (#7999) (alberto)d6b6ba1 Fix: no-var should fix ForStatement.init (#7993) (Toru Nagashima)Documentation42390fd Docs: update README.md for team (#8016) (Toru Nagashima)f2be7e3 Docs: Fix typo in object-curly-newline.md (#8002) (Danny Andrews)df2351a Docs: Fix misleading section in brace-style documentation (#7996) (Teddy Katz)Dependency Upgrades99d386d Upgrade: Espree v3.4.0 (#8019) (Kai Cataldo)Choresd7ffd88 Ch
8年前
記事のアイキャッチ画像
ESLint v3.14.1 released
ESLint Blog
Bug Fixes791f32b Fix: brace-style false positive for keyword method names (fixes #7974) (#7980) (Teddy Katz)72d41f0 Fix: no-var autofix syntax error in single-line statements (fixes #7961) (#7962) (Teddy Katz)b9e5b68 Fix: indent rule crash on sparse array with object (fixes #7959) (#7960) (Gyandeep Singh)Documentationd7a0add Docs: Add ESLint tutorial embed to getting started (#7971) (Jamis Charles)8bcbf5d Docs: typo in prefer-promise-reject-errors (#7958) (Patrick McElhaney)Choresa7bd66a Chore: Adding assign/redeclare tests to no-undefined (refs #7964) (#7965) (Kevin Partington)
8年前
記事のアイキャッチ画像
ESLint v3.14.0 released
ESLint Blog
HighlightsThis is a summary of some of the notable changes in this version of ESLint.New RulesTwo new rules were added:no-multi-assignprefer-promise-reject-errorsAutofixingAutofix support was added to one rule:no-else-returnFeatures05e7432 New: no-multi-assign rule (fixes #6424) (#7904) (Stewart Rand)f091d95 New: prefer-promise-reject-errors rule (fixes #7685) (#7689) (Teddy Katz)Enhancements243e47d Update: Add fixer for no-else-return (fixes #7863) (#7864) (Xander Dumaine)a664e8a Update: add ignoreJSX option to no-extra-parens (Fixes #7444) (#7926) (Robert Rossmann)bd5e219 Update: ensure brace-style validates class bodies (fixes #7608) (#7871) (Teddy Katz)55f0cb6 Update: refactor brace-style and fix inconsistencies (fixes #7869) (#7870) (Teddy Katz)Bug Fixes506324a Fix: no-var does not fix if causes ReferenceError (fixes #7950) (#7953) (Toru Nagashima)ca01e00 Fix: recognize all line terminators in func-call-spacing (fixes #7923) (#7924) (Francesco Trotta)8ac3518 Fix: no-useless-comput
8年前
記事のアイキャッチ画像
ESLint v3.13.1 released
ESLint Blog
Bug Fixes3fc4e3f Fix: prefer-destructuring reporting compound assignments (fixes #7881) (#7882) (Teddy Katz)f90462e Fix: no-extra-label autofix should not remove labels used elsewhere (#7885) (Teddy Katz)
8年前
記事のアイキャッチ画像
ESLint v3.13.0 released
ESLint Blog
HighlightsThis is a summary of some of the notable changes in this version of ESLint.New RulesOne new rule was added:prefer-destructuringAutofixingAutofix support was added to the following rules:no-extra-labelno-unneeded-ternaryobject-property-newlineoperator-linebreakFeatures27424cb New: prefer-destructuring rule (fixes #6053) (#7741) (Alex LaFroscia)Enhancementscd4c025 Update: add fixer for no-extra-label (#7840) (Teddy Katz)c9ba40a Update: add fixer for no-unneeded-ternary (#7540) (Teddy Katz)dd56d87 Update: add object-shorthand option for arrow functions (fixes #7564) (#7746) (Teddy Katz)d80d994 Update: add fixer for object-property-newline (fixes #7740) (#7808) (Teddy Katz)1beecec Update: add fixer for operator-linebreak (#7702) (Teddy Katz)ebcae1f Update: no-return-await with with complex return argument (fixes #7594) (#7595) (Dalton Santos)7d1dc7e Update: Make default-case comment case-insensitive (fixes #7673) (#7742) (Robert Rossmann)Bug Fixesaa75c92 Fix: Ensure prefer-const
8年前
記事のアイキャッチ画像
ESLint v3.12.2 released
ESLint Blog
Bug Fixesdec3ec6 Fix: indent bug with AssignmentExpressions (fixes #7747) (#7750) (Teddy Katz)Documentation639b798 Docs: Use Object.prototype in examples (#7755) (Alex Reardon)Build Related5344751 Build: Don’t create blogpost links from rule names within other words (#7754) (Teddy Katz)
8年前
記事のアイキャッチ画像
ESLint v3.12.1 released
ESLint Blog
Bug Fixes0ad4d33 Fix: indent regression with function calls (fixes #7732, fixes #7733) (#7734) (Teddy Katz)Documentationab246dd Docs: Rules restricting globals/properties/syntax are linked together (#7743) (Kevin Partington)df2f115 Docs: Add eslint-config-mdcs to JSCS Migration Guide (#7737) (Joshua Koo)Build Related4b77333 Build: avoid creating broken rule links in the changelog (#7731) (Teddy Katz)
8年前
記事のアイキャッチ画像
ESLint v3.12.0 released
ESLint Blog
HighlightsThis is a summary of some of the notable changes in this version of ESLint.Additional APIsThis version includes the addition of three new API methods:getRules to linterversion to linterversion to CLIEngineApologies for the lack of clear documentation on the above - our API documentation needs an overhaul, and we plan on updating this in the near future.New option for eslint --initThis version adds the ability to pick the airbnb-base config without eslint-plugin-react, for those who want to follow the Airbnb styleguide but do not use React.New RulesOne new rule was added:no-await-in-loopAutofixingAutofix support was added to the following rule:capitalized-commentsFeatures1d0d61d New: Add no-await-in-loop rule (#7563) (Nat Mote)2cdfb4e New: Additional APIs (fixes #6256) (#7669) (Ilya Volodin)Enhancementse569225 Update: fix false positive/negative of yoda rule (fixes #7676) (#7695) (Toru Nagashima)4278c42 Update: make no-obj-calls report errors for Reflect (fixes #7700) (#7710)
8年前
記事のアイキャッチ画像
ESLint v3.11.1 released
ESLint Blog
Bug Fixesbe739d0 Fix: capitalized-comments fatal error fixed (fixes #7663) (#7664) (Rich Trott)Documentationcc4cedc Docs: Fix a typo in array-bracket-spacing documentation (#7667) (Alex Guerrero)f8adadc Docs: fix a typo in capitalized-comments documentation (#7666) (Teddy Katz)
8年前
記事のアイキャッチ画像
ESLint v3.11.0 released
ESLint Blog
HighlightsThis is a summary of some of the notable changes in this version of ESLint.New RulesTwo new rules were added:capitalized-commentsrequire-awaitMore AutofixingAutofix support was added to two rules:operator-assignmentsort-importsFeaturesad56694 New: capitalized-comments rule (fixes #6055) (#7415) (Kevin Partington)89bd8de New: require-await rule (fixes #6820) (#7435) (Toru Nagashima)Enhancements7185567 Update: add fixer for operator-assignment (#7517) (Teddy Katz)faf5f56 Update: fix false negative of quotes with \n in template (fixes #7646) (#7647) (Teddy Katz)474e444 Update: add fixer for sort-imports (#7535) (Teddy Katz)Bug Fixesd50f6c1 Fix: incorrect location for no-useless-escape errors (fixes #7643) (#7645) (Teddy Katz)5c9a4ad Fix: Prevent quotes from fixing templates to directives (fixes #7610) (#7617) (Teddy Katz)Documentationf9b70b3 Docs: Enable example highlighting in rules examples (ref #6444) (#7644) (Alex Guerrero)54a993c Docs: Fix a typo in the require-yield.md (#7
8年前
記事のアイキャッチ画像
ESLint v3.10.2 released
ESLint Blog
Bug Fixes0643bfe Fix: correctly handle commented code in indent autofixer (fixes #7604) (#7606) (Teddy Katz)bd0514c Fix: syntax error after key-spacing autofix with comment (fixes #7603) (#7607) (Teddy Katz)f56c1ef Fix: indent crash on parenthesized global return values (fixes #7573) (#7596) (Teddy Katz)Documentation100c6e1 Docs: Fix example for curly “multi-or-nest” option (#7597) (Will Chen)6abb534 Docs: Update code of conduct link (#7599) (Nicholas C. Zakas)8302cdb Docs: Update no-tabs to match existing standards & improve readbility (#7590) (Matt Stow)
8年前
記事のアイキャッチ画像
ESLint v3.10.1 released
ESLint Blog
Bug Fixes8a0e92a Fix: handle try/catch correctly in no-return-await (fixes #7581) (#7582) (Teddy Katz)c4dd015 Fix: no-useless-return stack overflow on unreachable loops (fixes #7583) (#7584) (Teddy Katz)
8年前
記事のアイキャッチ画像
ESLint v3.10.0 released
ESLint Blog
HighlightsThis is a summary of some of the notable changes in this version of ESLint.One new rule, no-return-await, was added.no-extra-boolean-cast gained auto-fix functionality.Certain cases caught by eqeqeq can now be auto-fixed.New options were added to comma-style to check function parameters, function arguments, imports, and destructuring.func-names gained a new option to recognize ES6 inferred names.Features66fe9ff New: no-return-await rule. (fixes #7537) (#7547) (Jordan Harband)Enhancements7ee039b Update: Add comma-style options for calls, fns, imports (fixes #7470) (Max Englander)c3f4809 Update: Allow func-names to recognize inferred ES6 names (fixes #7235) (#7244) (Logan Smyth)2bd1dd7 Update: avoid creating extra whitespace in arrow-body-style fixer (#7504) (Teddy Katz)5003b1c Update: fix in/instanceof handling with space-infix-ops (fixes #7525) (#7552) (Teddy Katz)1766524 Update: “Error type should be” assertion in rule-tester (fixes 6106) (#7550) (Frans Jaspers)3c379ff Updat
8年前
記事のアイキャッチ画像
ESLint v3.9.1 released
ESLint Blog
Bug Fixes2012258 Fix: incorrect indent check for array property access (fixes #7484) (#7485) (Teddy Katz)8a71d4a Fix: no-useless-return false positive on conditionals (fixes #7477) (#7482) (Teddy Katz)56a662b Fix: allow escaped backreferences in no-useless-escape (fixes #7472) (#7474) (Teddy Katz)Documentation8ba68a3 Docs: Update broken link (#7490) (Devinsuit)65231d8 Docs: add the “fixable” icon for no-useless-return (#7480) (Teddy Katz)Build Relatedfffdf13 Build: Fix prefer-reflect rule to not crash site gen build (#7471) (Ilya Volodin)
8年前
記事のアイキャッチ画像
ESLint v3.9.0 released
ESLint Blog
HighlightsThis release includes some exciting new features, including a new results formatter and the ability for ESLint to support enhanced parsers!New formatterAs part of our continuing effort to support our users coming from JSCS, we’re excited to release the new codeframe formatter!error: Missing semicolon (semi) at file.js:1:13:> 1 | var a = true | ^ 2 | 3 |warning: There should be no space after '{' (object-curly-spacing) at file2.js:1:9:> 1 | var b = { c: true}; | ^ 2 | 3 |1 error and 1 warning found.Enhanced parsersESLint now supports enhanced parsers, which allows parsers to provide ESLint-specific services and functionality. This allows ESLint to support added functionality such as parsing type checkers.New Rulesno-useless-returnNew Rule Optionsfunc-name-matching: nameMatchesindent: CallExpressionmax-len: ignoreRegExpLiteralsNew autofixingarrow-body-stylebrace-stylenewline-after-varDeprecated rulesWith this release we deprecated prefer-reflect rule. The original intent of thi
8年前
記事のアイキャッチ画像
ESLint v3.8.1 released
ESLint Blog
Bug Fixes681c78a Fix: comma-dangle was confused by type annotations (fixes #7370) (#7372) (Toru Nagashima)7525042 Fix: Allow useless escapes in tagged template literals (fixes #7383) (#7384) (Teddy Katz)Documentation9106964 Docs: Fix broken link for stylish formatter (#7386) (Vitor Balocco)49d3c1b Docs: Document the deprecated meta property (#7367) (Randy Coulman)19d2996 Docs: Relax permission for merging PRs (refs eslint/tsc-meetings#20) (#7360) (Brandon Mills)
8年前
記事のアイキャッチ画像
ESLint v3.8.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Additional Property on Linting ResultsIf you’re using the ESLint Node.js API or writing a custom formatter, you’ll find that result object for each file now has a source property. This property contains the original source code from the file, allowing formatters to output contextual information along with linting error messages. This new source property on the file results object is intended to replace the source property on the lint message object, which will be removed in a later release. If you have a custom formatter making use of the source property on the lint message object, we recommend updating your formatter to check for the existence of the source property on the file results object and to use it if found. See the documentation for more information.New Rulesfunc-name-matchingNew Optionscomma-dangle … arrays, objects, imports, exports, and functions.space-before-function-paren …
8年前
記事のアイキャッチ画像
ESLint v3.7.1 released
ESLint Blog
Bug Fixes3dcae13 Fix: Use the correct location for comma-dangle errors (fixes #7291) (#7292) (Teddy Katz)cb7ba6d Fix: no-implicit-coercion should not fix ~. (fixes #7272) (#7289) (Eli White)Documentation8ec82ee Docs: change links of templates to raw data (#7288) (Toru Nagashima)Choresce590e2 Chore: Add additional tests for bin/eslint.js (#7290) (Teddy Katz)
8年前
記事のアイキャッチ画像
ESLint v3.7.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint. Though it’s a smaller release, it does include the ability to autofix a number of rules!AutofixingIn addition to linting code, many of the rules can automatically fix errors using the --fix flag. This can be a huge time saver for developers using ESLint on a pre-existing codebase! The following rules can now be autofixed:prefer-numeric-literalsno-undef-initno-useless-computed-keylines-around-directivewrap-iifedot-locationyodano-extra-parensEnhancementsc05a19c Update: add fixer for prefer-numeric-literals (#7205) (Teddy Katz)2f171f3 Update: add fixer for no-undef-init (#7210) (Teddy Katz)332d213 Update: Ensure indent handles nested functions correctly (fixes #7249) (#7265) (Teddy Katz)c36d842 Update: add fixer for no-useless-computed-key (#7207) (Teddy Katz)18376cf Update: add fixer for lines-around-directive (#7217) (Teddy Katz)f8e8fab Update: add fixer for wrap-iife (#7196) (Teddy Katz)
8年前
記事のアイキャッチ画像
ESLint v3.6.1 released
ESLint Blog
Documentation87625fa Docs: Improve eol-last examples in docs (#7227) (Chainarong Tangsurakit)de8eaa4 Docs: class-methods-use-this: fix option name (#7224) (Jordan Harband)2355f8d Docs: Add Brunch plugin to integrations (#7225) (Aleksey Shvayka)a5817ae Docs: Default option from operator-linebreak is afterand not always (#7228) (Konstantin Pschera)Dependency Upgradesb467436 Upgrade: Upgrade Espree to 3.3.1 (#7253) (Ilya Volodin)Build Related299a563 Build: Do not strip .md extension from absolute URLs (#7222) (Kai Cataldo)Chores27042d2 Chore: removed unused code related to scopeMap (#7218) (Yang Su)d154204 Chore: Lint bin/eslint.js (#7243) (Kevin Partington)
8年前
記事のアイキャッチ画像
ESLint v3.6.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Support for ES2017With this release, we support ES2017 syntax natively. To activate ES2017 parser option, you need to update parser option (in your .eslintrc.* file).{ "parserOptions": { "ecmaVersion": 2017, "sourceType": "module" }}Rules enhanced to support ES2017space-unary-opsno-extra-parenskeyword-spacingarrow-parensprefer-arrow-callbackno-unused-expressionsAuto-FixFour rules gained support for the --fix command line option:strictprefer-templatequote-propsno-regex-spacesEnhancements1b05d9c Update: add fixer for strict (fixes #6668) (#7198) (Teddy Katz)aaa3779 Update: Allow space-unary-ops to handle await expressions (#7174) (Teddy Katz)91bf477 Update: add fixer for prefer-template (fixes #6978) (#7165) (Teddy Katz)745343f Update: no-extra-parens supports async/await (refs #7101) (#7178) (Toru Nagashima)462a3f7 Update: keyword-spacing supports async/await (refs #7101) (#7179) (Toru Nag
8年前
記事のアイキャッチ画像
Changes to Issue and Pull Request Policies
ESLint Blog
From the beginning of the project, ESLint has always required issues for every pull request containing code. There were a number of reasons for that, mostly related to how we were triaging and handling incoming requests as well as the limitations the GitHub issue tracker imposed on us. Since that time, there have been a lot of improvements to the GitHub issue and pull request trackers, and as such, we’ve been able to make some changes.Most Pull Requests No Longer Require IssuesWe’ve lifted the restriction that all pull requests require issues. For almost all types of changes, you can now submit pull requests directly without an issue. We’ve added a pull request template, and as long as you fill out the required information in that template, you can feel free to submit pull requests without opening issues first.There are, however, two types of changes that still require issues:Any breaking change.Any changes to the core.Breaking and core changes have a high potential to affect end-users
8年前
記事のアイキャッチ画像
ESLint v3.5.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.New RulesThe following new rules were added in this release:prefer-numeric-literalsno-restricted-propertiesline-comment-positionlines-around-directiveAuto-FixEight rules gained support for the --fix command line option:no-floating-decimalno-implicit-coercionprefer-arrow-callbackcomma-styledot-notationnewline-before-returnwrap-regexnew-parensFeatures6d97c18 New: max-len: ignoreStrings+ignoreTemplateLiterals (fixes #5805) (#7049) (Jordan Harband)3960617 New: prefer-numeric-literals rule (fixes #6068) (#7029) (Annie Zhang)46cb690 New: no-restricted-properties rule (fixes #3218) (#7017) (Eli White)8277357 New: line-comment-position rule (fixes #6077) (#6953) (alberto)c1f0d76 New: lines-around-directive rule (fixes #6069) (#6998) (Kai Cataldo)Enhancements08fa538 Update: fix false negative of arrow-spacing (fixes #7079) (#7080) (Toru Nagashima)cec65e3 Update: add fixer for no-floating-decimal (
8年前
記事のアイキャッチ画像
ESLint v3.4.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Fix For Configuring Scoped Plugin RulesWe discovered a significant bug (#6362) when using scoped plugins. Scoped plugins use npm scopes such as @foo/eslint-plugin-bar. Due to a bug in ESLint, if you had a rule baz in the plugin @foo/eslint-plugin-bar, you would have to configure it without the scope, such as:rules: bar/baz: errorThis is problematic because it’s possible that an unscoped plugin eslint-plugin-bar might exist and need to be configured in the same way.Important: Starting in this release, you should now configure scoped plugin rules using the scope as a prefix. The previous example should now be written as:rules: @foo/bar/baz: errorThe other format will continue work until we release ESLint v4.0.0, at which point only the format using the package scope will work. We encourage you to update your configuration files as quickly as possible so as not to be caught up in the change
8年前
記事のアイキャッチ画像
ESLint v3.3.1 released
ESLint Blog
Bug Fixesb9b3446 Fix: sort-keys ignores destructuring patterns (fixes #6896) (#6899) (Kai Cataldo)Documentation02a00d6 Docs: clarify rule details for no-template-curly-in-string (#6900) (not-an-aardvark)3fe3a4f Docs: Update options in object-shorthand (#6898) (Grant Snodgrass)Build Relateda2f06be Build: optimize rule page title for small browser tabs (fixes #6888) (#6904) (Vitor Balocco)Chorescd09c96 Chore: Use object-shorthand batch 2 (refs #6407) (#6897) (Kai Cataldo)2841008 Chore: Use object-shorthand batch 1 (refs #6407) (#6893) (Kai Cataldo)
8年前
記事のアイキャッチ画像
ESLint v3.3.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Deprecated RulesIn continuing our work towards JSCS compatibility and reviewing the current rules list, we decided to deprecate several rules and replace them with new rules. In some cases there was just confusion about the existing rule and in others there were changes necessary for JSCS compatibility. Per our rule deprecation policy, the deprecated rules will remain as part of ESLint until at least May 2017, at which point we will evaluate removing those rules.We recommend you upgrade your configurations to use the new rules.Deprecated RuleReplaced Byno-native-reassign`no-global-assign’no-negated-in-lhs`no-unsafe-negation’no-spaced-func`func-call-spacing’New Rulessort-keysno-template-curly-in-stringFeaturese456fd3 New: sort-keys rule (fixes #6076) (#6800) (Toru Nagashima)f8ab8f1 New: func-call-spacing rule (fixes #6080) (#6749) (Brandon Mills)be68f0b New: no-template-curly-in-string rul
8年前
記事のアイキャッチ画像
ESLint v3.2.2 released
ESLint Blog
Bug Fixes46b14cd Fix: ignore MemberExpression in VariableDeclarators (fixes #6795) (#6815) (Nicholas C. Zakas)Dependency Upgrades510ce4b Upgrade: file-entry-cache@^1.3.1 (fixes #6816, refs #6780) (#6819) (alberto)
8年前
記事のアイキャッチ画像
ESLint v3.2.1 released
ESLint Blog
Bug Fixes4ca809e Fix: Normalizes messages so all end with a period (fixes #6762) (#6807) (Patrick McElhaney)c7488ac Fix: Make MemberExpression option opt-in (fixes #6797) (#6798) (Rich Trott)Documentation38d0d23 Docs: clarify minor releases and suggest using `~ to version (#6804) (Henry Zhu)715e8fa Docs: Update issue closing policy (fixes #6765) (#6808) (Nicholas C. Zakas)261a9f3 Docs: Update JSCS status in README (#6802) (alberto)5ae0887 Docs: Update no-void.md (#6799) (Daniel Hritzkiv)Build Related584577a Build: Pin file-entry-cache to avoid licence issue (refs #6816) (#6818) (alberto)288f7bf Build: Fix site generation (fixes #6791) (#6793) (Nicholas C. Zakas)
8年前
記事のアイキャッチ画像
ESLint v3.2.0 released
ESLint Blog
Featuresb22eb5c New: no-tabs rule (fixes #6079) (#6772) (Gyandeep Singh)Enhancements26c85dd Update: merge warnings of consecutive unreachable nodes (fixes #6583) (#6729) (Toru Nagashima)5320a6c Update: no-use-before-define false negative on for-in/of (fixes #6699) (#6719) (Toru Nagashima)95ea25a Update: Check indentation of multi-line chained properties (refs #1801) (#5940) (Rich Trott)053aa0c Update: Added ‘allowSuper’ option to no-underscore-dangle (fixes #6355) (#6662) (peteward44)Bug Fixese825458 Fix: Rule no-unused-vars had missing period (fixes #6738) (#6739) (Brian Mock)106e40b Fix: Correct grammar in object-curly-newline reports (fixes #6725) (#6728) (Vitor Balocco)a2090cb Fix: space-infix-ops doesn’t fail for type annotations(fixes #5211) (#6723) (Nicholas C. Zakas)Documentation1025772 Docs: Add plugin example to disabling with comments guide (fixes #6742) (#6747) (Brandon Mills)628aae4 Docs: fix inconsistent spacing inside block comment (#6768) (Brian Jacobel)2983c32 Docs: Ad
8年前
記事のアイキャッチ画像
ESLint v3.1.1 released
ESLint Blog
Bug Fixes565e584 Fix: eslint:all causes regression in 3.1.0 (fixes #6687) (#6696) (alberto)cb90359 Fix: Allow named recursive functions (fixes #6616) (#6667) (alberto)3f206dd Fix: balanced false positive in spaced-comment (fixes #6689) (#6692) (Grant Snodgrass)9f96086 Fix: Escape control characters in XML. (fixes #6673) (#6672) (George Chung)Documentation57f1676 Docs: Add missing brackets from code examples (#6700) (Plusb Preco)Chores124f066 Chore: Remove fixable key from multiline-ternary metadata (fixes #6683) (#6688) (Kai Cataldo)
8年前
記事のアイキャッチ画像
JSCS End of Life
ESLint Blog
When we announced that JSCS was joining ESLint, it was with a stated support period for JSCS of three months. Those three months have now passed and JSCS is now considered fully deprecated.What End of Life MeansThe end of life for JSCS means:We will no longer be evaluating issues on JSCSPull requests to JSCS will no longer be reviewed or mergedThere will be no further JSCS releasesThe JSCS GitHub repo will remain available as an archive of the JSCS source codeThe JSCS website will remain available as an archive of JSCS documentationExisting versions of JSCS will continue to be available and functionalThe JSCS developers will now be focusing their time and energy on ESLint, including JSCS compatibility issues.JSCS Compatibility in ESLintWe have setup a milestone for tracking all of our JSCS compatibility issues. At the time of this post, we are at 20% complete and are continuing to make progress. If you’re a JSCS user, we can use your help to make sure you have the best possible experie
8年前
記事のアイキャッチ画像
ESLint v3.1.0 released
ESLint Blog
Features720686b New: endLine and endColumn of the lint result. (refs #3307) (#6640) (Toru Nagashima)8a263ae New: multiline-ternary rule (fixes #6066) (#6590) (Kai Cataldo)Enhancements38639bf Update: make no-var fixable (fixes #6639) (#6644) (Toru Nagashima)2ba75d5 Update: relax outerIIFEBody definition (fixes #6613) (#6653) (Stephen E. Baker)4adb15f Update: Add balanced option to spaced-comment (fixes #4133) (#6575) (Annie Zhang)e951303 Update: Adding new key-spacing option (fixes #5613) (#5907) (Kyle Mendes)Bug Fixese8f8c6c Fix: incorrect exitCode when eslint is called with --stdin (fixes #6677) (#6682) (Steven Humphrey)dfc20e9 Fix: no-unused-vars false positive in loop (fixes #6646) (#6649) (Toru Nagashima)a8b4e40 Fix: Install required eslint plugin for “standard” guide (fixes #6656) (#6657) (Feross Aboukhadijeh)baeb313 Fix: Warning behavior for executeOnText (fixes #6611) (#6632) (Nicholas C. Zakas)ca323cf Fix: Use default assertion messages (fixes #6532) (#6615) (Dmitrii Abramov)2b
8年前
記事のアイキャッチ画像
ESLint v3.0.1 released
ESLint Blog
Bug Fixes27700cf Fix: no-unused-vars false positive around callback (fixes #6576) (#6579) (Toru Nagashima)a2cfa1b Fix: Make outerIIFEBody work correctly (fixes #6585) (#6596) (Nicholas C. Zakas)de3ed84 Fix: make no-unused-vars ignore for-in (fixes #2342) (#6126) (Oleg Gaidarenko)6ef2cbe Fix: strip Unicode BOM of config files (fixes #6556) (#6580) (Toru Nagashima)25fc7b7 Fix: false negative of max-len (fixes #6564) (#6565) (not-an-aardvark)Documentation124d8a3 Docs: Pull request template (#6568) (Nicholas C. Zakas)e9a2ed9 Docs: Fix rules\id-length exceptions typos (fixes #6397) (#6593) (GramParallelo)9c451a2 Docs: Use string severity in example (#6601) (Kenneth Williams)7a63717 Docs: Add missing pull request step (fixes #6595) (#6597) (Nicholas C. Zakas)ee7fcfa Docs: Correct type of outerIIFEBody in indent (fixes #6581) (#6584) (alberto)f6b8452 Docs: Distinguish examples in rules under Stylistic Issues part 6 (#6567) (Kenneth Williams)Chores8308c0b Chore: remove path-is-absolute in favo
8年前
記事のアイキャッチ画像
ESLint v3.0.0 released
ESLint Blog
As breaking changes can cause problems for some users, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, we recommend everyone read the migration thoroughly.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Requires Node.js 4 or higherESLint v3.0.0 now requires Node.js 4 or higher. Going forward, our plan is always to support the LTS version of Node.js and periodically end-of-life support for older Node.js versions. As both Node.js v0.10 and v0.12 will be out of maintenance mode at the end of 2016, we hope that this change won’t affect too many users.If you still need ESLint to run on Node.js < 4, then we recommend staying with ESLint v2.13.1 until you are ready to upgrade your Node.js version.eslint:recommended UpdateWe’ve added some new rules to eslint:recommended that we believe are important for al
8年前
記事のアイキャッチ画像
ESLint's New Rule Format
ESLint Blog
When ESLint began three years ago, it was a much smaller project with a much smaller user base. The project has grown a lot since that time and, in order to help the project scale, we’ve invested a lot of time into automating as many processes as possible. For instance, our release process is now completely automated, including deciding what the next version number should be based on the commits going into the release. When we looked over the processes that are still manual, there was one that jumped out as a big pain point: keeping rule documentation in sync. This wasn’t a big problem when there were a dozen rules, but with over 200, this repeated process has become a big time commitment.So, for the first time, we’ve decided to change the rule format for ESLint. The change is fairly small and we’re hoping you’ll agree that it makes a lot of sense. The overall design goal was allow for meta data to be stored directly on the rules themselves. Doing so allows us to have one source of tru
8年前
記事のアイキャッチ画像
ESLint v2.13.1 released
ESLint Blog
Bug Fixes434de7f Fix: wrong baseDir (fixes #6450) (#6457) (Toru Nagashima)3c9ce09 Fix: Keep indentation when fixing padded-blocks “never” (fixes #6454) (#6456) (Ed Lee)1e185b9 Fix: no-multiple-empty-lines errors when no line breaks (fixes #6449) (#6451) (strawbrary)Documentationa9d4cb2 Docs: Fix typo in max-params examples (#6471) (J. William Ashton)
8年前
記事のアイキャッチ画像
ESLint v2.13.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Last 2.x ReleaseThis is the last planned 2.x release. The next scheduled release is 3.0.0, which contains several small breaking changes. While there are breaking changes, we expect the impact to users to be very minimal. You can review the 3.0.0 plan for more information.More AutofixingWe are continuing to add autofixing to more rules, and this release we added autofixing to object-shorthand, padded-blocks, and no-multiple-empty-lines.Enhancementsda30cf9 Update: Add fixer for object-shorthand (fixes #6412) (#6418) (Nick Heiner)1316db0 Update: Add never option for func-names (fixes #6059) (#6392) (alberto)1c123e2 Update: Add autofix for padded-blocks (fixes #6320) (#6393) (alberto)5122f73 Update: no-multiple-empty-lines fixer (fixes #6225) (#6226) (Ruurd Moelker)Bug Fixescf223dd Fix: add test for a syntax error (fixes #6013) (#6378) (Toru Nagashima)8ec89c8 Fix: --print-config return confi
8年前
記事のアイキャッチ画像
ESLint v2.12.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.JSCS CompatibilityWe are continuing to work on compatibility with JSCS, and in this release we added two new rules that correspond to JSCS rules:max-lines - equivalent of maximumNumberOfLinesobject-curly-newline - equivalent of requirePaddingNewLinesInObjects and disallowPaddingNewLinesInObjectsIntroducing eslint:allWe’ve had numerous requests to provide a configuration that turns on all rules ESLint provides. You can now set extends in your configuration file equal to "eslint:all" to get every core rule enabled with their default settings.Important: This configuration is not recommended for production use because it changes with every minor and major version of ESLint. Use at your own risk.You can read more in the documentation.Performance ImprovementYou might have seen this case study of debugging a performance issue in ESLint at Google I/O. A pull request was filed during the talk that
8年前
記事のアイキャッチ画像
ESLint v2.11.1 released
ESLint Blog
Bug Fixes03beb27 Fix: no-useless-rename false positives (fixes #6266) (#6267) (alberto)113c1a8 Fix: max-statements-per-line false positive at exports (fixes #6264) (#6268) (Toru Nagashima)64b0d0c Fix: failed to parse /*eslint comments by colon (fixes #6224) (#6258) (Toru Nagashima)Build Relatedc8936eb Build: Don’t check commit count (fixes #5935) (#6263) (Nicholas C. Zakas)Documentationfe89037 Docs: Fix rule name in example (#6279) (Kenneth Williams)
8年前
記事のアイキャッチ画像
ESLint v2.11.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.JSCS CompatibilityWe’ve started our JSCS compatibility work by continuing to add new rules and rule options to fill in the gaps between what ESLint can do and what JSCS can do. This release includes the new no-useless-rename rule, which corresponds to the JSCS disallowIdenticalDestructuringNames.You can follow our progress on JSCS compatibility by looking at the milestone.New RulesThe new rules included in this release are:no-useless-renameunicode-bomno-prototype-builtinsFeaturesfea8fe6 New: no-useless-rename (fixes #6058) (#6249) (Kai Cataldo)088bda9 New: unicode-bom rule to allow or disallow BOM (fixes #5502) (#6230) (Andrew Johnston)04bd586 New: Disallow use of Object.prototype methods on objects (fixes #2693) (#6107) (Andrew Levine)Enhancements74c458d Update: key-spacing rule whitespace fixer (fixes #6167) (#6169) (Ruurd Moelker)53754ec Update: max in max-statements-per-line should be
8年前
記事のアイキャッチ画像
ESLint v2.10.2 released
ESLint Blog
Bug Fixesbda5de5 Fix: Remove default parser from CLIEngine options (fixes #6182) (#6183) (alberto)Documentatione59e5a0 Docs: Describe options in rules under Possible Errors part 3 (#6105) (Mark Pedrotti)Build Related842ab2e Build: Run phantomjs tests using karma (fixes #6128) (#6178) (alberto)
9年前
記事のアイキャッチ画像
ESLint v2.10.1 released
ESLint Blog
HighlightsThis release fixes an issue when using parser other than default one. And a few other minor issue found after the last release.Bug Fixes9397135 Fix: valid-jsdoc false positive at default parameters (fixes #6097) (#6170) (Toru Nagashima)2166ad4 Fix: warning & error count in CLIEngine.getErrorResults (fixes #6155) (#6157) (alberto)1e0a652 Fix: ignore empty statements in max-statements-per-line (fixes #6153) (#6156) (alberto)f9ca0d6 Fix: no-extra-parens to check for nulls (fixes #6161) (#6164) (Gyandeep Singh)d095ee3 Fix: Parser merge sequence in config (fixes #6158) (#6160) (Gyandeep Singh)f33e49f Fix: no-return-assign to check for null tokens (fixes #6159) (#6162) (Gyandeep Singh)
9年前
記事のアイキャッチ画像
ESLint v2.10.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.New RulesThis version introduces one new rule:object-property-newlineNew Rule OptionsA few rules got additional options:no-extra-parensno-irregular-whitespaceprefer-constobject-shorthandFeaturesf84eb80 New: Add new rule object-property-newline (fixes #5667) (#5933) (Vitor Balocco)Enhancements767da6f Update: add returnAssign option to no-extra-parens (fixes #6036) (#6095) (Kai Cataldo)0734967 Update: Add an option to prefer-const (fixes #5692) (#6040) (Toru Nagashima)7941d5e Update: Add autofix for lines-around-comment (fixes #5956) (#6062) (alberto)8633e4d Update: multipass should not exit prematurely (fixes #5995) (#6048) (alberto)3c44c2c Update: Adds an avoidQuotes option for object-shorthand (fixes #3366) (#5870) (Chris Sauvé)a3a6e06 Update: no-irregal-whitespace in a regular expression (fixes #5840) (#6018) (Linda_pp)Bug Fixes10b0933 Fix: Optimize no-irregular-whitespace for the commo
9年前
記事のアイキャッチ画像
ESLint v2.9.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Improved AutofixThis release features a new version of autofix. Now, when you use the --fix option, ESLint will make multiple passes over your code in an attempt to fix as many issues as possible. As a result, autofix will take more time now than it did previously, but we believe that this change will ultimately result in less developer time spent fixing things that can be automatically fixed by ESLint.Additionally, due to implementing multipass autofix, we were able to extend autofix to more rules. The following rules now will be autofixed:comma-dangleno-whitespace-before-propertyNew RulesThis version introduces some new rules:no-unsafe-finallyno-useless-computed-keyFeaturese606523 New: Rule no-unsafe-finally (fixes #5808) (#5932) (Onur Temizkan)a01b412 New: Add no-useless-computed-key rule (fixes #5402) (Burak Yigit Kaya)Enhancementse2ad1ec Update: object-shorthand lints computed method
9年前
記事のアイキャッチ画像
ESLint Joins The jQuery Foundation
ESLint Blog
I’ve believed for a while that once an open source project reaches a certain level of ubiquity, the maintainers have a responsibility to ensure its survival for the good of the community. Over the past couple of years, I watched as important projects hit roadblocks: YUI abruptly shut down, Node.js splintered before merging back together, and Express was left in a state of disarray. Communities were left scrambling, unsure what to rely on. During this time, I started formulating a plan for how to keep ESLint from falling into the same pattern.Today, ESLint joins the jQuery Foundation to ensure that the project will live on for as long as the community needs it. The jQuery Foundation has been a great home for projects like jQuery and Esprima, and after merging with the Dojo Foundation, is also the home of projects such as Lodash and Grunt. I’m proud to have ESLint listed alongside some of the most important and influential projects in the JavaScript ecosystem.From my perspective, ESLint
9年前
記事のアイキャッチ画像
ESLint v2.8.0 released
ESLint Blog
Enhancements76913b6 Update: Add metadata to existing rules - Batch 3 (refs #5417) (Vitor Balocco)fb3c2eb Update: allow template literals (fixes #5234) (Jonathan Haines)5a4a935 Update: Add metadata to existing rules - Batch 2 (refs #5417) (Vitor Balocco)f8db9c9 Update: add nestedBinaryExpressions to no-extra-parens (fixes #3065) (Ilya Volodin)0045d57 Update: allowNamedFunctions in prefer-arrow-callback (fixes #5675) (alberto)19da72a Update: Add metadata to existing rules - Batch 1 (refs #5417) (Vitor Balocco)24b6215 Update: Include ‘typeof’ in rule ‘no-constant-condition’ (fixes #5228) (Vamshi krishna)6fd7d82 Update: Change order in eslint --init env options (fixes #5742) (alberto)6703c02 Update: no-useless-escape / exact locations of errors (fixes #5751) (Onur Temizkan)b0e6bc4 Update: add allowEmptyCatch option to no-empty (fixes #5800) (Kai Cataldo)228f201 Update: commentPattern option for no-fallthrough rule (fixes #5757) (Artyom Lvov)2b202fc Update: Add ignore option to space-before
9年前
記事のアイキャッチ画像
Welcoming JSCS To ESLint
ESLint Blog
ESLint and JSCS started out at roughly the same time, just three weeks apart in 2013. Both teams had a similar idea: leverage the ecosystem of ESTree-compatible tools such as Esprima to create the next generation of static analysis tools for JavaScript. While ESLint’s primary goal was to create a linter with pluggable rules, JSCS’s primary goal was to codify style guides for easy verification and fixing. Both projects grew and became popular, and soon, we found ourselves playing catch up with each other for features.For nearly three years now, both teams have been working on solving the same types of issues: how to share configurations, how to autofix some problems, and how to enable the respective ecosystems to grow and thrive. We’ve been doing a lot of the same work in parallel, and recently the teams met to talk about that. We all came to the conclusion that it would be better to be one team, working together on solving these problems, rather than continuing to compete with one anot
9年前
記事のアイキャッチ画像
ESLint v2.7.0 released
ESLint Blog
Bug Fixes161ddac Fix: remove console.dir (fixes #5770) (Toru Nagashima)0c33f6a Fix: indent rule uses wrong node for class indent level (fixes #5764) (Paul O’Shannessy)Documentation7e80867 Docs: Update sentence in fixable rules (Mark Pedrotti)4f93c32 Docs: Clarify array-bracket-spacing with newlines (fixes #5768) (alberto)
9年前
記事のアイキャッチ画像
ESLint v2.6.0 released
ESLint Blog
Enhancements7aacba7 Update: Deprecate option maximum in favor of max (fixes #5685) (Vitor Balocco)9b73ffd Update: destructuring option of prefer-const rule (fixes #5594) (Toru Nagashima)24a61a4 Update: make no-useless-escape allowing line breaks (fixes #5689) (Toru Nagashima)f59d91d Update: no-param-reassign error msgs (fixes #5705) (Isaac Levy)8d0cd0d Update: Basic valid-jsdoc default parameter support (fixes #5658) (Tom Andrews)Bug Fixesce2accd Fix: vars-on-top now accepts exported variables (fixes #5711) (Olmo Kramer)5fe6fca Fix: no-useless-escape \B regex escape (fixes #5750) (Onur Temizkan)12902c5 Fix: valid-jsdoc crash w/ Field & Array Type (fixes #5745) (fixes #5746) (Burak Yigit Kaya)d736bc2 Fix: Treat SwitchCase like a block in lines-around-comment (fixes #5718) (Scott O’Hara)4ecd45e Fix: Ensure proper lookup of config files (fixes #5175, fixes #5468) (Nicholas C. Zakas)088e26b Fix: Update doctrine to allow hyphens in JSDoc names (fixes #5612) (Kai Cataldo)c1b16cd Fix: Object
9年前
記事のアイキャッチ画像
Updated Rule Policy
ESLint Blog
Rules have been at the core of ESLint since the very first release. We’ve gone through several development cycles of rules, first trying to replicate JSHint rules, creating ECMAScript 6 rules as best practices were being uncovered, shooting for feature parity with JSCS rules, and so on. Now, almost three years after ESLint was first created, we have over 200 rules in the core and continue to get new rule proposals every week.When ESLint began, we wanted to have a good mix of rules that caught potential errors as well as rules about code style. We never intended to cover everything everyone would want, but rather, we wanted to cover the most common concerns facing JavaScript developers and leave the rest to custom rules. That’s why ESLint has supported custom rules from the very first release: we knew that we could never provide the world with all of the rules that people would want, so the only real solution was to give everyone the ability to create their own rules.After a lot of deli
9年前
記事のアイキャッチ画像
ESLint v2.5.3 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Rolling Back of Bundled DependenciesIn v2.5.0, we started bundling dependencies with ESLint. The goal was to create a more stable ESLint package that was functional regardless of the state of npm. Unfortunately, this process turned out to be more complicated than we expected. As we continued to get bug reports over the past couple of days, we decided to revert the bundling of dependencies for now until we can investigate further.Bug Fixes98e6bd9 Fix: Correct default for indentation in eslint --init (fixes * #5698) (alberto)679095e Fix: make the default of options.cwd in runtime (fixes * #5694) (Toru Nagashima)c41fab9 Fix: don’t use path.extname with undefined value (fixes * #5678) (Myles Borins)Documentation1cc7f8e Docs: Remove mention of minimatch for .eslintignore (Ian VanSchooten)5bd69a9 Docs: Reorder FAQ in README (alberto)4f06f2f Docs: Distinguish examples in rules under Best Practic
9年前
記事のアイキャッチ画像
ESLint v2.5.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Node.js without OpenSSL CompatibilityPreviously, the --cache feature was using the Node.js crypto module to calculate hashes of files to determine which files had changed. Because of this, ESLint wouldn’t work on Node.js compiled without OpenSSL. We changed the --cache feature to use a third-party hash function instead, allowing us to remove our dependency on the Node.js crypto module and ensure ESLint works fine for Node.js without OpenSSL.Bundled DependenciesThis is the first version of ESLint that bundles its dependencies. Recent events have made it clear that for a development tool like ESLint, bundling dependencies makes a lot of sense. This will ensure a couple of things:That everyone using v2.5.0 of ESLint will be using the same dependencies, meaning that dependency updates won’t break a previously working ESLint version.We won’t fall victim to dependencies that were available at r
9年前
記事のアイキャッチ画像
ESLint v2.4.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.babel-eslint Compatibility FixThe v2.3.0 release introduced a change that broke compatibility with babel-eslint. We realize that a lot of you depend on babel-eslint and so we wanted to make sure to restore compatibility as quickly as possible. We couldn’t undo the change that cause the problem as it would have caused a regression for ESLint, and it took us some time to figure out the right approach to solve the problem.With v2.4.0, babel-eslint compatibility is now restored with a permanent solution that should prevent this from happening again. We appreciate your patience as we tried to determine the best long-term solution.Features13ef1c7 New: add --parser-options to CLI (fixes #5495) (Jordan Harband)Enhancements9c6c70c Update: add allowParens option to no-confusing-arrow (fixes #5332) (Burak Yigit Kaya)Bug Fixes97b2466 Fix: estraverse/escope to work with unknowns (fixes #5476) (Nichola
9年前
記事のアイキャッチ画像
ESLint v2.3.0 released
ESLint Blog
HighlightsHere are some highlights of changes in this release.Support for string severity in configsv2.3.0 introduces ability to use strings as severity level in configuration files. Before you had to use number 0, 1 and 2 to configure rules. Now we also added ability to use strings. You can now use:off - 0warn - 1error - 2Both string and int values will work the same wayEcmaScript version 7 SupportWe recently updated our parser Espree with support for new exponentiation operator. You can now set ecmaVersion to 7 under parserOptions. We also updated space-infix-ops to support new ** operator.Improved error messaging for pluginsIf ESLint fails to find a plugin required by the config file, we will now print a clear message explaining to user what needs to be done to fix this issue.Features9e9daab New: newline-before-return rule (fixes #5009) (Kai Cataldo)560c0d9 New: no-restricted-globals rule implementation (fixes #3966) (Benoît Zugmeyer)Enhancements1b2c6e0 Update: Proposed no-magic-num
9年前
記事のアイキャッチ画像
ESLint v2.2.0 released
ESLint Blog
Features59e9c5b New: eslint-disable-next-line (fixes #5206) (Kai Cataldo)Bug Fixes2977248 Fix: Do not cache .eslintrc.js (fixes #5067) (Nick)211eb8f Fix: no-multi-spaces conflicts with smart tabs (fixes #2077) (Afnan Fahim)6dc9483 Fix: Crash in constructor-super (fixes #5319) (Burak Yigit Kaya)7020b82 Fix: sort-imports warned between default and members (fixes #5305) (Toru Nagashima)2f4cd1c Fix: constructor-super and no-this-before-super false (fixes #5261) (Toru Nagashima)afb6708 Fix: indent rule forgot about some CallExpressions (fixes #5295) (Burak Yigit Kaya)0b1cd19 Fix: Ignore parser option if set to default parser (fixes #5241) (Kai Cataldo)Documentation45a22b5 Docs: remove esprima-fb from suggested parsers (Henry Zhu)a4d9cd3 Docs: Fix semi rule typo (Brandon Mills)9d005c0 Docs: Correct option name in no-implicit-coercion rule (Neil Kistner)3f48875 Docs: Fix yield star spacing examples (Dmitriy Lazarev)4dab76e Docs: Update preferType heading to keep code format (fixes #5307) (chi
9年前
記事のアイキャッチ画像
ESLint v2.1.0 released
ESLint Blog
Enhancements0d6850e Update: Allow var declaration at end of block (fixes #5246) (alberto)Bug Fixesc9c34ea Fix: Skip computed members in newline-per-chained-call (fixes #5245) (Burak Yigit Kaya)29da8aa Fix: newline-after-var crash on a switch statement (fixes #5277) (Toru Nagashima)86c5a20 Fix: func-style should ignore ExportDefaultDeclarations (fixes #5183) (Burak Yigit Kaya)ba287aa Fix: Consolidate try/catches to top levels (fixes #5243) (Ian VanSchooten)c1e3a73 Fix: Popular style init handles missing package.json keys (refs #5243) (Brandon Mills)9078537 Fix: indent on variable declaration with separate array (fixes #5237) (Burak Yigit Kaya)44f6915 Fix: ESLint Bot mentions the wrong person for extra info (fixes #5229) (Burak Yigit Kaya)c612a8e Fix: no-empty-function crash (fixes #5227) (Toru Nagashima)980e139 Fix: Combine all answers for processAnswers (fixes #5220) (Ian VanSchooten)Documentation6580d1c Docs: Fix incorrect api.verify JSDoc for config param (refs #5104) (Burak Yigit Ka
9年前
記事のアイキャッチ画像
ESLint v2.0.0 released
ESLint Blog
In this announcement, we are including all changes from each of the release candidates to make it easier to see what changed from the release candidates to now.As there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a major release version, you will not automatically be upgraded by npm in most cases. You must specify the latest tag when installing:npm i eslint@latest --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all
9年前
記事のアイキャッチ画像
ESLint v2.0.0-rc.1 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.Code Path AnalysisESLint v2.0.0 formally introduces code path analysis. While we’ve tried to make best guesses
9年前
記事のアイキャッチ画像
ESLint v2.0.0-rc.0 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.Code Path AnalysisESLint v2.0.0 formally introduces code path analysis. While we’ve tried to make best guesses
9年前
記事のアイキャッチ画像
ESLint v2.0.0-beta.3 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.Code Path AnalysisESLint v2.0.0 formally introduces code path analysis. While we’ve tried to make best guesse
9年前
記事のアイキャッチ画像
ESLint v2.0.0-beta.2 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.Code Path AnalysisESLint v2.0.0 formally introduces code path analysis. While we’ve tried to make best guesse
9年前
記事のアイキャッチ画像
ESLint v2.0.0-beta.1 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devCode Path AnalysisESLint v2.0.0 formally introduces code path analysis. While we’ve tried to make best guesses at how execution flowed through code, there were several instances where we just couldn’t get everything correct. For instance, trying to guarantee that every code path contained a return statement. Fully implementing code path analysis means that we (and you, through custom rules) can now correctly understand how
9年前
記事のアイキャッチ画像
ESLint v2.0.0-alpha-2 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devCode Path AnalysisESLint v2.0.0 formally introduces code path analysis. While we’ve tried to make best guesses at how execution flowed through code, there were several instances where we just couldn’t get everything correct. For instance, trying to guarantee that every code path contained a return statement. Fully implementing code path analysis means that we (and you, through custom rules) can now correctly understand how
9年前
記事のアイキャッチ画像
ESLint v2.0.0-alpha-1 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devCode Path AnalysisESLint v2.0.0 formally introduces code path analysis. While we’ve tried to make best guesses at how execution flowed through code, there were several instances where we just couldn’t get everything correct. For instance, trying to guarantee that every code path contained a return statement. Fully implementing code path analysis means that we (and you, through custom rules) can now correctly understand how
9年前
記事のアイキャッチ画像
Espree v3.0.0 Alpha 2 released
ESLint Blog
InstallationSince Espree v3.0.0 is a prerelease version, you’ll need to install it using the @next tag:$ npm install espree@nextThe @latest tag is still on the latest v2.x version of Espree.Note: We are providing this release to gather feedback. Help out by filing issues if you find a problem.HighlightsHere are some highlights of changes in this release.Removal of most ecmaFeaturesWe introduced ecmaFeatures as a way to start incrementally implementing ECMAScript 6 at a time when it was constantly changing. We did this in order to allow people to start using those features that were ready without forcing usage of all features.Now that ES6 is finalized and all the features are implemented, most people are using all ES6 features and it’s a pain to have to manually configure them all. Additionally, there’s no good reason to turn on just some features and not all of them (as that’s not how the real world works).In this second alpha release, we’ve made the following changes:Introduced ecmaVe
9年前
記事のアイキャッチ画像
Espree v3.0.0 Alpha 1 released
ESLint Blog
InstallationSince Espree v3.0.0 is a prerelease version, you’ll need to install it using the @next tag:$ npm install espree@nextThe @latest tag is still on the latest v2.x version of Espree.Note: We are providing this release to gather feedback. Help out by filing issues if you find a problem.HighlightsHere are some highlights of changes in this release.Based on AcornIt was never our intention to maintain another JavaScript parser. When Espree was first introduced, Esprima development had stopped and it seemed like something need to fill that void. We forked Esprima to start Espree, and development went on from there. However, Esprima started development again and we resolved to fold Espree back into Esprima at some point. One of the big sticking points was the ability to switch on and off different language features. While such a capability was on the roadmap, it was very far off in the future, and we needed to make a decision.Ultimately, we found that Acorn already supported the hook
9年前
記事のアイキャッチ画像
ESLint v1.10.3 released
ESLint Blog
Bug FixesFix: Add for-of to curly rule (fixes #4571) (Kai Cataldo)Fix: Ignore space before function in array start (fixes #4569) (alberto)DocumentationDocs: Update strict rule docs (fixes #4583) (Nicholas C. Zakas)Docs: Reference .eslintrc.* in contributing docs (fixes #4532) (Kai Cataldo)
9年前
記事のアイキャッチ画像
ESLint v1.10.2 released
ESLint Blog
Bug FixesFix: lines-around-comment with multiple comments (fixes #3509) (alberto)Fix: Bugfix for eqeqeq autofix (fixes #4540) (Kevin Partington)Fix: Add for-in to curly rule (fixes #4436) (Kai Cataldo)Fix: valid-jsdoc unneeded require check fix (fixes #4527) (Gyandeep Singh)Fix: brace-style ASI fix for if-else condition (fixes #4520) (Gyandeep Singh)Fix: Incorrect location in no-fallthrough (fixes #4516) (alberto)Fix: no-spaced-func had been crashed (fixes #4508) (Toru Nagashima)Fix: Add a RestProperty test of no-undef (fixes #3271) (Toru Nagashima)DocumentationDocs: Load badge from HTTPS (Brian J Brennan)Dependency UpgradesUpgrade: [email protected] (refs #4485) (Nicholas C. Zakas)Upgrade: Pinned down js-yaml to avoid breaking dep (fixes #4553) (alberto)Upgrade: [email protected] (fixes #4545) (Kevin Partington)Build RelatedBuild: Add branch update during release process (fixes #4491) (Gyandeep Singh)Build: Allow revert commits in commit messages (fixes #4452) (alberto)Build: Update eslint bo
9年前
記事のアイキャッチ画像
ESLint v1.10.1 released
ESLint Blog
Bug FixesFix: Revert freezing context object (refs #4495) (Nicholas C. Zakas)
9年前
記事のアイキャッチ画像
ESLint v1.10.0 released
ESLint Blog
Note: This is the last scheduled release prior to v2.0.0. In the coming weeks, we will be focusing specifically on v2.0.0 and will be regularly releasing alpha versions for testing. These alpha versions are not suitable for use in a production environment and are provided primarily for getting early feedback.HighlightsHere are some highlights of changes in this release.Configuration File Formatsv1.10.0 introduces the ability to use configuration files in different formats. Instead of the regular .eslintrc file, you can use a JavaScript (.eslintrc.js), a YAML file (.eslintrc.yml or .eslintrc.yaml), or a JSON file (.eslintrc.json). We are formally deprecating use of the .eslintrc extensionless configuration file format in favor the format-specific versions. Don’t worry, we’ll still support .eslintrc files for a long time, but we’d like to encourage everyone to move to the new file formats as you’ll get advantages such as syntax highlighting and error detection with many editors. Read mor
9年前
記事のアイキャッチ画像
ESLint v1.9.0 released
ESLint Blog
HighlightsHere are some highlights of changes in this release.New Rulesno-case-declarationsBetter npm 3 SupportDue to the changes in dependency management in npm 3, some users were getting errors when attempting to run ESLint. We’ve updated our dependencies and ESLint should now work correctly for users of npm 3.FeaturesNew: Add no-case-declarations rule (fixes #4278) (Erik Arvidsson)EnhancementsUpdate: Make radix accept a “as-needed” option (fixes #4048) (Michał Gołębiowski)Update: Add default to max-nested-callbacks (fixes #4297) (alberto)Update: Add quotes to error messages to improve clarity (fixes #4313) (alberto)Update: Extract glob and filesystem logic from cli-engine (fixes #4305) (Ian VanSchooten)Update: Detect and fix wrong linebreaks (fixes #3981) (alberto)Bug FixesFix: Update the message to include number of lines (fixes #4342) (Brian Delahunty)Fix: Fixer to not overlap ranges among fix objects (fixes #4321) (Gyandeep Singh)Fix: Check comments in space-in-parens (fixes #430
9年前
記事のアイキャッチ画像
ESLint v1.8.0 released
ESLint Blog
HighlightsHere are some highlights of changes in this release.New Rulesno-arrow-conditionarrow-body-styleAutofixingThe following rules have been updated to include autofixing:comma-spacingCaching EnhancementsIf you’ve been using the --cache feature, it will now optionally create a directory for your cache instead of a file. This change means that it’s possible to use a single cache for every project you work on rather than one cache per project.To facilitate this change, we are deprecating --cache-file in favor of --cache-location, which can accept either a file path or a directory (be sure to include the trailing slash to indicate a directory). The --cache-file flag will be removed in v2.0.0.Read more in the documentation.RuleTester EnhancementThe RuleTester just got a bit smarter. It will now verify that the AST was not modified during execution of a rule. This was added as it’s possible for rules to accidentally modify the AST during execution, and that modification can negatively a
9年前
記事のアイキャッチ画像
ESLint v1.7.3 released
ESLint Blog
Bug FixesFix: Support comma-first style in key-spacing (fixes #3877) (Brandon Mills)Fix: no-magic-numbers: variable declarations (fixes #4192) (Ilya Panasenko)Fix: Support ES6 shorthand in key-spacing (fixes #3678) (Brandon Mills)Fix: indent array with memberExpression (fixes #4203) (Gyandeep Singh)Fix: indent param function on sameline (fixes #4174) (Gyandeep Singh)Fix: no-multiple-empty-lines fails when empty line at EOF (fixes #4214) (alberto)Fix: comma-dangle false positive (fixes #4200) (Nicholas C. Zakas)Fix: valid-jsdoc prefer problem (fixes #4205) (Nicholas C. Zakas)Fix: correct no-multiple-empty-lines at EOF (fixes #4140) (alberto)DocumentationDocs: Add missing single-quote (Kevin Lamping)
9年前
記事のアイキャッチ画像
ESLint v1.7.2 released
ESLint Blog
Bug FixesFix: comma-dangle confused by parens (fixes #4195) (Nicholas C. Zakas)Fix: no-mixed-spaces-and-tabs (fixes #4189, fixes #4190) (alberto)Fix: no-extend-native disallow using Object.properties (fixes #4180) (Nathan Woltman)Fix: no-magic-numbers should ignore Number.parseInt (fixes #4167) (Henry Zhu)
9年前
記事のアイキャッチ画像
ESLint v1.7.1 released
ESLint Blog
Bug FixesFix: id-match schema (fixes #4155) (Nicholas C. Zakas)Fix: no-magic-numbers should ignore parseInt (fixes #4167) (Nicholas C. Zakas)Fix: indent param function fix (fixes #4165, fixes #4164) (Gyandeep Singh)
9年前
記事のアイキャッチ画像
ESLint v1.7.0 released
ESLint Blog
HighlightsHere are some highlights of changes in this release.New Rulesno-empty-patternno-magic-numbersExtending JavaScript configsYou’ve always been able to use npm packages in the extends field of your configuration file. Now, you can directly link to JavaScript files in extends, allowing you to reference JavaScript configuration files directly even when they are not part of an npm package.FeaturesNew: Create eslint-config-eslint (fixes #3525) (Nicholas C. Zakas)New: add “consistent” option to the “curly” rule (fixes #2390) (Benoît Zugmeyer)New: no-empty-pattern rule (fixes #3668) (alberto)New: no-magic-numbers rule (fixes #4027) (Vincent Lemeunier)EnhancementsUpdate: Support .js files for config (fixes #3102) (Gyandeep Singh)Update: RuleTester allows string errors in invalid cases (fixes #4117) (Kevin Partington)Update: added exceptions to lines-around-comment rule. (fixes #2965) (Mathieu M-Gosselin)Update: Add matchDescription option to valid-jsdoc (fixes #2449) (Gyandeep Singh)Upd
9年前
記事のアイキャッチ画像
ESLint v1.6.0 released
ESLint Blog
HighlightsHere are some highlights of changes in this release.Autofixing of more rulesESLint v1.6.0 introduces several more autofixing rules to use with the --fix command line argument. In this release, we have implemented autofixing in these rules:space-unary-opscomputed-property-spacingno-multi-spacesobject-curly-spacingarray-bracket-spacinggenerator-star-spacingarrow-spacingblock-spacingWhen you run ESLint on the command line with the --fix flag, it will automatically fix any problems that it can (not all problems are fixable at once) and will not report the problems that were fixed.This feature is still considered experimental but is backed up by a lot of unit tests verifying correctness. Still, we expect to find some edge cases that we didn’t anticipate, so we’d appreciate your feedback.Limitations: the --fix flag does not work for piped-in text and has no effect on code that uses ESLint processors.FeaturesNew: no-negated-condition rule (fixes #3740) (alberto)EnhancementsUpdate: I
9年前
記事のアイキャッチ画像
ESLint v1.5.1 released
ESLint Blog
Bug FixesFix: valid-jsdoc fix for param with properties (fixes #3476) (Gyandeep Singh)Fix: valid-jsdoc error with square braces (fixes #2270) (Gyandeep Singh)Fix: space-before-keywords had been wrong on getters (fixes #3854) (Toru Nagashima)Fix: no-dupe-args had been wrong for nested destructure (fixes #3867) (Toru Nagashima)Fix: don’t ignore config if cwd is the home dir (fixes #3846) (Mathias Schreck)Fix: func-style had been warning arrows with this (fixes #3819) (Toru Nagashima)Fix: space-before-keywords; allow opening curly braces (fixes #3789) (Marko Raatikka)DocumentationDocs: io.js is the new Node.js (thefourtheye)Docs: Fix method signature on working-with-rules docs (fixes #3862) (alberto)Docs: Add related ternary links (refs #3835) (Ian VanSchooten)Dependency UpgradesUpgrade: doctrine to 0.7.0 (fixes #3891) (Gyandeep Singh)Build RelatedBuild: Fix broken .gitattributes generation (fixes #3566) (Nicholas C. Zakas)Build: Fix formatter docs generation (fixes #3847) (Nicholas C. Za
9年前
記事のアイキャッチ画像
ESLint v1.5.0 released
ESLint Blog
HighlightsHere are some highlights of changes in this release.Autofixing of more rulesESLint v1.5.0 introduces several more autofixing rules to use with the --fix command line argument. In this release, we have implemented autofixing in these rules:eol-lastindentno-extra-semino-spaced-funcno-trailing-spacesspace-after-keywordsspace-before-blocksspace-before-keywordsspace-infix-opsspace-return-throw-casespace-before-function-parenWhen you run ESLint on the command line with the --fix flag, it will automatically fix any problems that it can (not all problems are fixable at once) and will not report the problems that were fixed.This feature is still considered experimental but is backed up by a lot of unit tests verifying correctness. Still, we expect to find some edge cases that we didn’t anticipate, so we’d appreciate your feedback.Limitations: the --fix flag does not work for piped-in text and has no effect on code that uses ESLint processors.–debug FlagSometimes ESLint doesn’t do what
9年前
記事のアイキャッチ画像
ESLint v1.4.3 released
ESLint Blog
Bug FixesFix: Directory ignoring should work (fixes #3812) (Nicholas C. Zakas)Fix: jsx-quotes exception for attributes without value (fixes #3793) (Mathias Schreck)
9年前
記事のアイキャッチ画像
ESLint v1.4.2 released
ESLint Blog
Bug FixesFix: Ensure **/node_modules works in ignore files (fixes #3788) (Nicholas C. Zakas)Fix: Ensure ./ works correctly with CLI (fixes #3792) (Nicholas C. Zakas)
9年前
記事のアイキャッチ画像
ESLint v1.4.1 released
ESLint Blog
Bug FixesFix: CLIEngine default cache parameter name (fixes #3755) (Daniel G. Taylor)Fix: Glob pattern from .eslintignore not applied (fixes #3750) (Burak Yigit Kaya)Fix: Skip JSDoc from NewExpression (fixes #3744) (Nicholas C. Zakas)DocumentationDocs: Shorten and simplify autocomment for new issues (Nicholas C. Zakas)
9年前
記事のアイキャッチ画像
ESLint v1.4.0 released
ESLint Blog
HighlightsThis release contains some exciting new features!Autofixing of some rulesESLint v1.4.0 introduces the --fix command line argument to automatically fix some rules. In this first release, we have implemented autofixing in three rules:semieqeqeqquotesWhen you run ESLint on the command line with the --fix flag, it will automatically fix any problems that it can (not all problems are fixable at once) and will not report the problems that were fixed.This feature is still considered experimental but is backed up by a lot of unit tests verifying correctness. Still, we expect to find some edge cases that we didn’t anticipate, so we’d appreciate your feedback.Limitations: the --fix flag does not work for piped-in text and has no effect on code that uses ESLint processors.Cached resultsIf you’re running ESLint on a large codebase, you may find it can take a significant amount of time. To help in those situations, we’ve introduced the --cache flag. When --cache is present, ESLint will ca
9年前
記事のアイキャッチ画像
ESLint v1.3.1 released
ESLint Blog
Bug FixesFix: indent to not crash on empty files (fixes #3570) (Gyandeep Singh)Fix: Remove unused config file (fixes #2227) (Gyandeep Singh)
9年前
記事のアイキャッチ画像
ESLint v1.3.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Using ASTs with the Node.js APIA long-requested feature was finally added for those using the Node.js API: the ability to pass ESLint an AST and retrieve an AST once ESLint is finished. There’s a new SourceCode type that encapsulates already-processed code, and a SourceCode object can now be passed to linter.verify() instead of text. For example:var linter = require("eslint").linter, SourceCode = require("eslint").SourceCode;var sourceCode = new SourceCode(someText, anAST), messages = linter.verify(sourceCode, config);Additionally, you can retrieve a SourceCode object from linter after linting is complete:var messages = linter.verify("var foo = bar"), sourceCode = linter.getSourceCode();sourceCode.ast; // the ASTsourceCode.text; // the original textThis should make it easier for tools using the Node.js API to avoid double-parsing of JavaScript code if they are already creating an AST.HTML
9年前
記事のアイキャッチ画像
ESLint 1.2.1 released
ESLint Blog
Bug FixesFix: “key-spacing” crashes eslint on object literal shorthand properties (fixes #3463) (Burak Yigit Kaya)Fix: object-curly-spacing shows the incorrect column for opening brace (fixes #3438) (Burak Yigit Kaya)Fix: prefer-arrow-callback false positive at recursive functions (fixes #3454) (Toru Nagashima)Fix: ignore leading space check for null elements in comma-spacing (fixes #3392) (Mathias Schreck)Fix: one-var rule doesn’t have default options (fixes #3449) (Burak Yigit Kaya)Fix: Refactor no-duplicate-case to be simpler and more efficient (fixes #3440) (Burak Yigit Kaya)DocumentationDocs: object-curly-spacing doc is inaccurate about exceptions (Burak Yigit Kaya)Docs: Fix trailing spaces in README (Nicholas C. Zakas)Docs: Update gyandeeps and add byk (Nicholas C. Zakas)Docs: Update plugins documentation for 1.0.0 (Nicholas C. Zakas)
9年前
記事のアイキャッチ画像
ESLint 1.2.0 released
ESLint Blog
FeaturesNew: block-spacing rule (fixes #3303) (Toru Nagashima)New: no-dupe-class-members rule (fixes #3294) (Toru Nagashima)New: prefer-arrow-callback rule (fixes #3140) (Toru Nagashima)New: prefer-template rule (fixes #3014) (Toru Nagashima)New: Add commonjs environment (fixes #3377) (Nicholas C. Zakas)New: enable -c flag to accept a shareable config (fixes #2543) (Shinnosuke Watanabe)EnhancementsUpdate: Add support for Allman to brace-style rule, brackets on newline (fixes #3347) (Burak Yigit Kaya)Update: add support for semicolon in comma-first setup in indent rule (fixes #3423) (Burak Yigit Kaya)Update: allow disabling new-cap on object methods (fixes #3172) (Burak Yigit Kaya)Update: Clean up tests for CLI config support (refs #2543) (Gyandeep Singh)Update: Improve checkstyle format (fixes #3183) (Burak Yigit Kaya)Update: Improve error message for indent rule violation (fixes #3340) (Burak Yigit Kaya)Update: Improve validation error messages (fixes #3193) (Burak Yigit Kaya)Update:
9年前
記事のアイキャッチ画像
ESLint 1.1.0 released
ESLint Blog
FeaturesNew: Added grep-style formatter (fixes #2991) (Nobody Really)New: Jest environment (fixes #3212) (Darshak Parikh)EnhancementsUpdate: add new multi-or-nest option for the curly rule (fixes #1806) (Ivan Nikulin)Update: Added as-needed option to arrow-parens (fixes #3277) (Jamund Ferguson)Update: Expose getErrorResults as a static method on CLIEngine (fixes #3242) (Gyandeep Singh)Update: Expose getFormatter as a static method on CLIEngine (fixes #3239) (Gyandeep Singh)Update: Split out generic AST methods into utility (fixes #962) (Gyandeep Singh)Bug FixesFix: accessor-pairs false positive (fixes #3262) (Toru Nagashima)Fix: context.getScope() returns correct scope in blockBindings (fixes #3254) (Toru Nagashima)Fix: es6 env had been missing spread and newTarget (fixes #3281) (Toru Nagashima)Fix: eslint-env in comments had not been setting ecmaFeatures (fixes #2134) (Toru Nagashima)Fix: indent rule for multi-line objects and arrays (fixes #3236) (Gyandeep Singh)Fix: indent rule for
9年前
記事のアイキャッチ画像
ESLint 1.0.0 released
ESLint Blog
In this announcement, we are including all changes from each of the release candidates to make it easier to see what changed from the release candidates to now.As there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a major release version, you will not automatically be upgraded by npm. You must specify the latest tag when installing:npm i eslint@latest --save-devYou can also specify the version directly:npm i [email protected] --save-devNew Language Features1.0.0 has been upgraded to the latest version of Espree, which means you now have access to additional language features:newTarget allows you to use new.target in your code
9年前
記事のアイキャッチ画像
ESLint 1.0.0-rc-3 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.New Language Features1.0.0-rc-2 has been upgraded to the latest version of Espree, which means you now have acc
9年前
記事のアイキャッチ画像
ESLint 1.0.0-rc-2 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.New Language Features1.0.0-rc-2 has been upgraded to the latest version of Espree, which means you now have acc
9年前
記事のアイキャッチ画像
ESLint 1.0.0-rc-1 released
ESLint Blog
Note: This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-devYou can also specify the version directly:npm i [email protected] --save-devMigration GuideAs there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. Not all ESLint users will be affected by the changes, however, the changes are big enough that we recommend everyone read the migration thoroughly.New Language Features1.0.0-rc-1 has been upgraded to the latest version of Espree, which means you now have acc
9年前
記事のアイキャッチ画像
ESLint 0.24.1 released
ESLint Blog
Bug FixesFix: no-redeclare checks module scopes (fixes #2903) (Toru Nagashima)Fix: add destructuring support to comma-dangle rule (fixes #2911) (Mathias Schreck)Fix: Added missing export syntax support to the block-scoped-var rule. (fixes #2887) (Mathieu M-Gosselin)Fix: Include execScript in no-implied-eval rule (fixes #2873) (Frederik Braun)Fix: lines-around-comment was crashing in some cases due to a missing check (fixes #2892) (Mathieu M-Gosselin)Fix: max-len to report correct column number (fixes #2926) (Mathias Schreck)Fix: object-shorthand computed props (fixes #2937) (Jamund Ferguson)Fix: Remove invalid check inside getJSDocComment function (fixes #2938) (Gyandeep Singh)Fix: Revert 1-based column changes in tests for patch (refs #2284) (Nicholas C. Zakas)Fix: Shallow cloning issues in eslint config (fixes #2961) (Gyandeep Singh)Fix: Support class syntax for line-around-comment rule (fixes #2894) (Gyandeep Singh)Fix: Yoda should ignore comparisons where both sides are constants (
9年前
記事のアイキャッチ画像
Preparing for 1.0.0
ESLint Blog
Creation of 0.x BranchThe 0.x branch on the public repo is a record of the last release of the 0.x version tree. The master branch will be the work for 1.0.0. If bug fixes or other changes are needed before 1.0.0 is ready, then those changes will be cherry-picked onto the 0.x branch and a release will be made from that.We do not plan on having a 0.25.0 release - this will only happen if 1.0.0 is significantly delayed.1.0.0 Release CandidatesBecause 1.0.0 is a major release with significant breaking changes, we will be doing several release candidates before finalizing the 1.0.0 release. We will do this periodically as changes are being merged. The intent is to give everyone a chance to try out the upgrade path and provide feedback. Release candidate version will be appended with rc- to indicate that these are not considered production-ready.1.0.0 Migration DocsWith each release candidate, we will update migrations documentation. The jump from 0.24.0 to 1.0.0 is a big one, and we’re loo
9年前
記事のアイキャッチ画像
ESLint 0.24.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.1.0.0 Work Beginning0.24.0 is the last planned release prior to 1.0.0. We focused mostly on bug fixes and filling functionality gaps in this release, so we are better prepared for 1.0.0. We will still do bugfix releases as necessary, see the release plans for more information.New Rulesconstructor-super - ensures super() is called in derived class constructorsno-this-before-super - ensures this isn’t used before super in derived class constructorsno-unexpected-multiline - ensures function calls and property access are wholly on one linearray-bracket-spacing - ensures proper spacing of array literal bracketsBug FixesFix: no-extra-semi in class bodies (fixes #2794) (Toru Nagashima)Fix: Add --init to the CLI options (fixes #2817) (Gyandeep Singh)Fix: Allow blocked comments with markers and new-line (fixes #2777) (Gyandeep Singh)Fix: arraysInObjects for object-curly-spacing (fixes #2752) (Jamu
9年前
記事のアイキャッチ画像
ESLint 0.23.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Configuration ValidationThe biggest feature of this release is addition of rules configuration validation. Now if you accidentally included a non-existing option in a rule configurationyou will be notified about it when you run ESLint. This also works for inline configuration inside JavaScript files and for configuration passed on command line.Note that prior to this release, invalid rule options meant the rule would use its default options. This would happen without any warning, so improperly configured rules weren’t working as intended in previous releases. If you start getting warned about invalid rule configuration, be sure to consult the rule documentation to determine how to fix it.New RulesThree new rules were added in this releasecomputed-property-spacing - require or disallow padding inside computed properties (off by default)prefer-const - suggest using of const declaration for
9年前
記事のアイキャッチ画像
ESLint 0.22.1 released
ESLint Blog
Build-RelatedBuild: Remove release notes auto-publish (refs #2640) (Ilya Volodin)
9年前
記事のアイキャッチ画像
ESLint 0.22.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.New RulesWe added 3 new rules to ESLint this release:lines-around-comment - Enforces empty lines around comments (off by default)accessor-pairs - Enforces getter/setter pairs in objects (off by default)object-curly-spacing - Disallow or enforce spaces inside of curly braces in objects.We also renamed existing rule no-empty-class to no-empty-character-class to prevent confusion with ES6 classesPreparation for configuration validationWe added rule schemas as well as schema validation, in preparation of enabling validation of .eslintrc configuration files.Bug FixesFix: “consistent-this” incorrectly flagging destructuring of this (fixes #2633) (David Aurelio)Fix: no-multiple-empty-lines and template strings (fixes #2605) (Jamund Ferguson)Fix: Shared config being clobbered by other config (fixes #2592) (Dominic Barnes)Fix: Improve around function/class names of no-shadow (fixes #2556, #2552) (
9年前
記事のアイキャッチ画像
ESLint 0.21.2 released
ESLint Blog
Bug FixesFix: one-var exception for ForStatement.init (fixes #2505) (Brandon Mills)Fix: Don’t throw spurious shadow errors for classes (fixes #2545) (Jimmy Jia)Fix: valid-jsdoc rule to support exported functions (fixes #2522) (Gyandeep Singh)Fix: Allow scoped packages in configuration extends (fixes #2544) (Eric Isakson)DocumentationDocs: Add chatroom to FAQ (Nicholas C. Zakas)Docs: Move Gitter badge (Nicholas C. Zakas)
10年前
記事のアイキャッチ画像
ESLint 0.21.1 released
ESLint Blog
Bug FixesFix: --init indent setting (fixes #2493) (Nicholas C. Zakas)Fix: Allow comment before comma for comma-spacing rule (fixes #2408) (Gyandeep Singh)Fix: dot-location should use correct dot token (fixes #2504) (Mathias Schreck)Fix: Enable full support for eslint-env comments (refs #2134) (Ilya Volodin)Fix: forced no-shadow to check all scopes (fixes #2294) (Jose Roberto Vidal)Fix: loc obj in report fn expects column (fixes #2481) (Varun Verma)Fix: Not to override the required extended config object directly (fixes #2487) (Gyandeep Singh)Fix: rule no-duplicate-case problem with CallExpressions. (fixes #2499) (Matthias Osswald)Fix: Stop linebreak-style from crashing (fixes #2490) (James Whitney)Revert “Fix: sanitise Jekyll interpolation during site generation (fixes #2297)” (Nicholas C. Zakas)DocumentationDocs: Added Gitter badge (The Gitter Badger)Docs: added recursive function example to no-unused-vars (Jose Roberto Vidal)Docs: Fix typo (then -> than) (Vladimir Agafonkin)Docs: Fix
10年前
記事のアイキャッチ画像
ESLint 0.21.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Config InitializationSetting up a configuration file for the first time can be difficult, and we’re trying to make it easier. That’s why we’ve added the --init command line flag. Using this flag, you’ll be walked through a series of questions to setup the basic information in your config file. For example:$ eslint --init? What style of indentation do you use? Spaces? What quotes do you use for strings? Double? What line endings do you use? Unix? Do you require semicolons? Yes? Are you using ECMAScript 6 features? Yes? Where will your code run? Browser? Do you use JSX? No? What format do you want your config file to be in? YAMLSuccessfully created .eslintrc file in c:\Users\Nicholas\projects\personal\tmpWe hope this new feature will help get people started with ESLint faster.Config InheritanceAnother feature we’ve added is the ability to inherit configuration settings. Now, you can use ext
10年前
記事のアイキャッチ画像
ESLint 0.20.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Updating Rules for ECMAScript 6We’re still getting a fair number of bug reports related to specific ECMAScript 6 features. The good news is that the bug report rate has slowed dramatically, so we’re getting to a much more stable place in terms of ES6 support. Keep those bug reports coming!Scoped Plugin SupportThis release adds support for scoped npm modules (beginning with @eslint/, for example). This is a new feature that npm recently released, and we’re happy to follow up by allowing you to use scoped packages as ESLint plugins. See #2360 for more information.1.0.0 UpdateWith the ESTree changes in, we just have a few outstanding issues before releasing 1.0.0. Those issues are:#2302 - create a way to bootstrap .eslintrc files for new users#2284 - should we switch to using 1-based column numbers instead of 0-based column numbers?#2226 - split space-in-brackets rule; implement array-litera
10年前
記事のアイキャッチ画像
ESLint 0.19.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.More ECMAScript 6 fixesThis release addresses the root cause of several issues related to ECMAScript 6 features. We previously were having a lot of trouble with scoping issues related to modules, destructuring, and destructured parameters. In this release, we fixed a whole host of such errors so our ES6 support should be really solid at this point.ESTree Support for Default and Rest ParametersThe big parser upgrade to support the ESTree format for default and rest parameters is now complete. You can feel free to create custom rules using these features and feel confident knowing that the AST format will not be changing.1.0.0 UpdateWith the ESTree changes in, we just have a few outstanding issues before releasing 1.0.0. Those issues are:#2284 - should we switch to using 1-based column numbers instead of 0-based column numbers?#2226 - split space-in-brackets rule; implement array-literal-sp
10年前
記事のアイキャッチ画像
ESLint 0.18.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.More Changes to JSX/React handlingFollowing up on the removal of React semantics in 0.17.0, we discovered that there was some lingering pieces of code that were still looking at React semantics that had been missed. So, we removed those extra bits of code so that ESLint is now completely free of React semantics. We will parse JSX fine, but we are not applying any semantics to the syntax.If you’re using React and want proper handling of identifiers, please use the excellent eslint-plugin-react.Even More ECMAScript 6 fixesThe bug reports for ECMAScript 6 features are continuing to roll in, and we’re working quickly to address those bugs as they appear. The standardization of ECMAScript 6 and its ESTree representation means we can really dig in and finalize functionality now.Website ReorganizationA big part of this release has been the reorganization of eslint.org. All content is still avail
10年前
記事のアイキャッチ画像
ESLint 0.17.1 released
ESLint Blog
Bug FixesFix: block-scoped-var to work with classes (fixes #2048) (Nicholas C. Zakas)Fix: block-scoped-var to work with destructuring (fixes #2059) (Nicholas C. Zakas)Fix: Exempt \0 from no-octal-escape (fixes #1923) (Michael Ficarra)Fix: Method name resolution in complexity rule (fixes #2049) (Nicholas C. Zakas)Fix: no-func-assign should not fail on import declarations (fixes #2060) (Igor Zalutsky)Fix: no-redeclare should check Node.js scope (fixes #2064) (Nicholas C. Zakas)Fix: no-unused-vars crash from escope workaround (fixes #2042) (Brandon Mills)Fix: restrict dot-notation keywords to actual ES3 keywords (fixes #2075) (Michael Ficarra)Fix: rule no-duplicate-case problem with MemberExpressions. (fixes #2038) (Dieter Oberkofler)Fix: space-before-function-parentheses generator methods (fixes #2082) (Brandon Mills)Fix: yoda range exceptions with this (fixes #2063) (Brandon Mills)DocumentationDocs: Fix documentation on configuring eslint with comments (Miguel Ping)Docs: Update no-new d
10年前
記事のアイキャッチ画像
ESLint 0.17.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Changes to JSX/React handlingIn this release, we made the decision to stop supporting React semantics of JSX. We had previously been checking JSX for identifiers in our rules and realized we could only do that correctly by building-in knowledge of how React works. Such knowledge already hurt us when the semantics changed a bit, and we really didn’t want to find ourselves in that situation again.ESLint will continue to support JSX syntax but will no longer apply React semantics to that syntax. Since we know that many ESLint users want React semantics, we’ve ensured there’s a way for the excellent eslint-plugin-react to fill this gap. Specifically, we’ve added a new method that is available to rules that can indicate a variable has been used. Many of the React-based errors people were reporting related directly to interpretation of when variables had been used, and this change lets other pl
10年前
記事のアイキャッチ画像
ESLint 0.16.2 released
ESLint Blog
Bug FixesFix: Don’t warn about parens around yield (fixes #1981) (Nicholas C. Zakas)Fix: Ensure globalReturn isn’t on when node:false (fixes #1995) (Nicholas C. Zakas)Fix: Global block-scope-var check should work (fixes #1980) (Nicholas C. Zakas)Dependency UpgradesDowngrade: escope pegged to 2.0.6 (refs #2001) (Nicholas C. Zakas)Upgrade: escope to 2.0.7 (fixes #1978) (Nicholas C. Zakas)Upgrade: estraverse to latest for ESTree support (fixes #1986) (Nicholas C. Zakas)DocumentationDocs: Update descriptive text for --no-ignore option. (David Anson)
10年前
記事のアイキャッチ画像
ESLint 0.16.1 released
ESLint Blog
Bug FixesFix: Ensure all export nodes are traversable (fixes #1965) (Nicholas C. Zakas)Fix: Ensure class names are marked as used (fixes #1967) (Nicholas C. Zakas)Fix: Node.js scoping in block-scoped-var (fixes #1969) (Nicholas C. Zakas)Fix: remove typo that caused a crash (fixes #1963) (Fabricio C Zuardi)EnhancementsUpdate: Enable ES6 scoping for more options (Nicholas C. Zakas)DocumentationDocs: Added missing “are” (Sean Wilkinson)
10年前
記事のアイキャッチ画像
ESLint 0.16.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Complete ECMAScript 6 support0.16.0 adds more language options for parsing JavaScript, including:ClassesModulesBoth of these options are off by default, and you can enable them in your configuration file. See Configuring ESLint for more information.Classes and modules follow the newly-standardized estree AST node structure, and so these changes may not be completely compatible with older parsers that have not yet upgraded.We’ve included a new es6 environment that enables all ECMAScript 6 features except modules. Since modules imply global strict mode, that puts the parser into a different mode. You’ll need to manually opt-in to using modules via ecmaFeatures.modules. So if you are using ECMAScript 6 modules in your project, you’ll want to enable the es6 environment in addition to ecmaFeatures.modules.Note: The AST structure for default parameters and rest parameters is still undergoing ch
10年前
記事のアイキャッチ画像
ESLint 0.15.1 released
ESLint Blog
Bug FixesFix: Allow globalReturn in consistent-return (fixes #1868) (Brandon Mills)Fix: check all semicolons in no-space-before-semi (fixes #1885) (Mathias Schreck)Fix: Refactor comma-spacing (fixes #1587, fixes #1845) (Roberto Vidal)Fix: semi rule should check throw statements (fixes #1873) (Mathias Schreck)DocumentationDocs: Add CustomInk to the list of companies (Derek Lindahl)Docs: Added HolidayCheck AG as user (0xPIT)Docs: Alphabetize project & company usage list (Derek Lindahl)Docs: Fix typo (Brenard Cubacub)Docs: fix typo (Henry Zhu)Build RelatedBuild: Fix release task (Nicholas C. Zakas)Dependency UpgradesUpgrade: chalk to 1.0.0 (Sindre Sorhus)
10年前
記事のアイキャッチ画像
ESLint 0.15.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.More Language Options0.15.0 adds more language options for parsing JavaScript, including:Spread operatorRest parametersDestructuringAll of these options are off by default, and you can enable them in your configuration file. See Configuring ESLint for more information.Note: The AST structure for default parameters and rest parameters is still undergoing change and discussion. We recommend not creating custom rules using default or rest parameters until after ESLint 1.0.0.New Rule: space-before-function-parenthesesWe had a significant gap in spacing after function names and before anonymous function parentheses. In order to cover this case, we removed checkFunctionKeyword option from space-after-keywords and deprecated space-after-function-name (it will be removed in 1.0.0). You should switch your code to use the new space-before-function-parentheses as soon as possible.1.0.0 UpdateWe’re v
10年前
記事のアイキャッチ画像
ESLint 0.14.1 released
ESLint Blog
Bug FixesFix: Exit code should be 1 for any number of errors (fixes #1795) (Nicholas C. Zakas)Fix: Check indentation of first line (fixes #1796) (Nicholas C. Zakas)Fix: strict rules shouldn’t throw on arrow functions (fixes #1789) (Nicholas C. Zakas)
10年前
記事のアイキャッチ画像
ESLint 0.14.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.More Language Options0.14.0 adds more language options for parsing JavaScript, including:ECMAScript 6 arrow functionsGlobal return statements (for use with Node.js scripts)All of these options are off by default, and you can enable them in your configuration file. See Configuring ESLint for more information.ECMAScript 6 fixesWith the introduction of ECMAScript 6 features, a lot of bugs popped up that had to be tracked down. We fixed a large number of bugs related to ES6 features so things like variable scoping should be fairly accurate now.New Rule: indentA rule covering indentation has been one of our long-requested features since ESLint began. We ported the logic from JSCS into a new rule, indent. It has been modified so it’s not exactly the same, and although we provided incorrect attribution initially, that has been fixed to comply with JSCS’s licensing terms. We thank the JSCS team f
10年前
記事のアイキャッチ画像
ESLint 0.13.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.More ECMAScript 6 support0.13.0 adds more support for several ECMAScript 6, including:Template stringsDefault parametersUnicode code point escapesAll of these options are off by default, and you can enable them in your configuration file. See Configuring ESLint for more information.Breaking: Block scopingAdditionally, 0.13.0 has full support for block scoping (let and const), so all scope-related rules should work the way you expect. This is a breaking change because if you were previously using let and const, the scope was being calculated incorrectly, and that may result in different behavior than in 0.13.0.Deprecating global-strict and no-extra-strictThe global-strict and no-extra-strict rules have been deprecated in favor of adding this functionality into the strict rule. We suggest you upgrade to using the updated strict rule as soon as possible. The global-strict and no-extra-strict
10年前
記事のアイキャッチ画像
ESLint 0.12.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Partial ECMAScript 6 support0.12.0 introduces support for several ECMAScript 6 features, including:let and constRegular expression y flagRegular expression u flagBinary literalsOctal literalsfor-ofGeneratorsObject literal syntax changesAll of these options are off by default, and you can enable them in your configuration file. See Configuring ESLint for more information.We also have two rules that are specific for ES6: no-var and generator-star.Known limitation: Block scope calculation doesn’t work yet for let and const. We are actively working on fixing that. This may affect rules like no-unused-vars until we resolve this (hopefully soon).JSX support0.12.0 also has full support for the JSX extension created by Facebook. ESLint now fully supports JSX natively (it’s not transformed before linting). JSX parsing is off by default, and you can enable it in your configuration file. This is bei
10年前
記事のアイキャッチ画像
ESLint 0.11.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.New parser0.11.0 is the first version of ESLint to run on our own parser, Espree. Espree is currently configured to behave like Esprima 1.2.2, which was the parser that 0.10.0 was using, so you should see no differences in the behavior of ESLint related to the parser change.Making this change allowed us to fix a couple of bugs we’ve had open that were related to Esprima issues.ECMAScript 5 by defaultThis is the first release where we’ve started transitioning all settings to be ECMAScript 5 by default. ECMAScript 5 is the most widely-supported version of JavaScript, and so we want to assume ECMAScript 5 code and allow users to opt-in to ECMAScript 3 and ECMAScript 6 features.Part of this involved a change made for #1484, which updated the dot-notation rule to allow keywords be used (as allowed by ECMAScript 5 but not ECMAScript 3). The option allowKeywords was added with a default value of
10年前
記事のアイキャッチ画像
Introducing Espree, an Esprima alternative
ESLint Blog
Since ESLint’s very first release, we’ve built on top of the open source Esprima parser. Doing so allowed us to get a drop-in, production-ready parser on which we could built the linter of our dreams. That meant we could spend less time worrying about parsing JavaScript code and more time figuring out the best ways to work with that code. ESLint is built around the SpiderMonkey AST produced by Esprima and that decision served us well up until this point.Earlier this year as we were attempting to include ECMAScript 6 and JSX support in ESLint, we ran into a lot of problems. Esprima’s ECMAScript 6 support hadn’t been published and there hadn’t been a new release in several months. In the meantime, Facebook had created its own fork that had both ECMAScript 6 and JSX support, and so we attempted to use that instead, hoping for a drop-in replacement. Unfortunately, we found several key disparities between the way it worked and Esprima 1.2.2, the version upon which ESLint is currently based.
10年前
記事のアイキャッチ画像
ESLint 0.10.2 released
ESLint Blog
Bug FixesFix: detect for…in in no-loop-func (fixes #1573) (Greg Cochard)Fix: operator-assignment addition is non-commutative (fixes#1556) (Brandon Mills)EnhancementsUpdate: simplify comma-spacing logic (fixes #1562) (Brandon Mills)
10年前
記事のアイキャッチ画像
ESLint 0.10.1 released
ESLint Blog
Bug FixesFix: comma-spacing and comma-style to work with array literals (fixes #1492) (Nicholas C. Zakas)Fix: comma-spacing has false positives when parenthesis are used (fixes #1457) (Jamund Ferguson)Fix: prevent crash on empty blocks in no-else-return (fixes #1527) (Mathias Schreck)Fix: Restrict use-isnan violations to comparison operators. (Fixes #1535) (Jordan Harband)Fix: wrong op index in no-multi-spaces (fixes #1547) (Brandon Mills)Build ChangesBuild: Ensure changelog works with large semver versions (Nicholas C. Zakas)Build: Fix md to html conversion regex (fixes #1525) (Brandon Mills)Build: make the “gensite” target work when DOCS_DIR does not exist (fixes #1530) (Jeff Williams)DocumentationDocs: alphabetize the “Stylistic Issues” section (Jeff Williams)Docs: badges should only refer to master branch (Mathias Schreck)Docs: Fix v0.10.0 changelog (Nicholas C. Zakas)EnhancementsUpdate: better operator regex in use-isnan rule (fixes #1551) (Michael Ficarra)
10年前
記事のアイキャッチ画像
ESLint 0.10.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.Command Line InterfaceThe CLI for ESLint has been updated, including some breaking changes.First, the node_modules directory will automatically be ignored in all projects (#1163). This comes after finding that many projects added node_modules to their .eslintignore files and fielding many questions about why ESLint was slow (answer: because it was linting node_modules).Second, it’s now possible to lint files without an extension (#1131). All you have to do is pass them in on the command line, such as:eslint file-without-extESLint will not automatically lint files without extensions in directories that are passed on the command line. You can also pass files without a .js extension directly on the command line to lint them. In short, ESLint will lint anything you pass directly on the command line without question.Third, you can now specify alternate file extensions for ESLint to find when l
10年前
記事のアイキャッチ画像
Announcing ES6 and JSX Support
ESLint Blog
We’ve been working on #1291 for a while to see how we could add support for ECMAScript 6 and JSX into ESLint. While we were investigating adding ES6 support, we were also getting a fair amount of requests to add JSX support. We soon realized that Facebook’s Esprima fork that supports both ES6 and JSX would be the easiest way to move forward.This left us with some questions about how to support ES6 and JSX in ESLint without disrupting the user experience for those who don’t want support. When you are working in a strict ES5 environment, you don’t want ES6 and JSX patterns to be parsed as correct, you want a syntax error to be thrown. So a lot of the work has been going into thinking through this problem - ensuring those who want the support can get it while ensuring those who don’t will get the syntax errors that they expect.Work has begunBeginning today, work for integrating ES6 and JSX will begin. What that means is:Work begins on the es6jsx branch on the main ESLint repo.Development
10年前
記事のアイキャッチ画像
ESLint 0.9.2 released
ESLint Blog
Bug FixesFix: ! negates .eslintignore patterns (fixes #1093) (Brandon Mills)Fix: ‘.md’ to ‘.html’ with anchors (fixes #1415) (Nate-Wilkins)Fix: add severity flag for ignored file warning (fixes #1401) (Mathias Schreck)Fix: Allow line breaks in key-spacing rule (fixes #1407) (Brandon Mills)Fix: check switch statements in space-before-blocks (fixes #1397) (Mathias Schreck)Fix: disable colors during test run (fixes #1395) (Mathias Schreck)Fix: Keep sinon at ~1.10.3 (fixes #1406) (Brandon Mills)Fix: let fs.stat throw if a file does not exist (fixes #1296) (Mathias Schreck)Fix: Nested occurrences of no-else-return now show multiple reports (fixes #1369) (Jordan Hawker)EnhancementsUpdate: Option type for mixed tabs and spaces (fixes #1374) (Max Nordlund)FeaturesNew: add isPathIgnored method to CLIEngine (fixes #1392) (Mathias Schreck)DocumentationDocs: changing eslint to ESLint and add missing backtick (Mathias Schreck)Docs: Documents the functionality to load a custom formatter from a file
10年前
記事のアイキャッチ画像
ESLint 0.9.1 released
ESLint Blog
Bug FixesFix: plugins without rulesConfig causes crash (fixes #1388) (Mathias Schreck)DocumentationDocs: fix link on governance model (azu)
10年前
記事のアイキャッチ画像
ESLint 0.9.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.PluginsPlugins can now be shipped with a default configuration specified. For more information, see the plugins documentation.Comma SpacingThere’s a new comma-spacing rule, so we removed comma spacing checks from space-infix-ops to consolidate that functionality.CLIEngine updatedThe CLIEngine object has been updated with more functionality for tools developers. You can now use it to lint plain text via a executeOnText() method and a getConfigForFile() method that returns the calculated configuration information for a given file. You can read more about this in the Node.js API documentation.Governance ModelWith this release, we’re introducing the ESLint Governance Model to help more people become involved with the project. The governance model establishes the rules by which contributors can increase their involvement with the project and influence its direction.Breaking ChangesBreaking: Re
10年前
記事のアイキャッチ画像
ESLint 0.8.2 released
ESLint Blog
Bug FixesFix: load .eslintrc from HOME (fixes #1262) (Beau Gunderson)Fix: Load .eslintrc in directory with $HOME as an ancestor (fixes #1266) (Beau Gunderson)Fix: strict should check function expressions (fixes #1244) (Brandon Mills)EnhancementsNew: add ignoreCase option to sort-vars (fixes #1272) (Mathias Schreck)New: Add sharable rule settings (fixes #1233) (Ilya Volodin)DocumentationDocs: add finally to space-after-keywords documentation (Mathias Schreck)Docs: add intellij plugin to integrations (ido)Docs: Changing NPM to npm (Peter deHaan)Docs: Fix broken Markdown on configuration page (Nicholas C. Zakas)Docs: Fix reference to wrong rule name (Harry Wolff)Docs: fix typo (Barry Handelman)Docs: fix typo in no-ex-assign documentation (Michael Ficarra)Docs: fix vars-on-top documentation (fixes #1234) (Mathias Schreck)Docs: Fixed a typo in brace-style.md (Anton Antonov)Docs: Update README with links and FAQs (Nicholas C. Zakas)Docs: Updated contribution guidelines to add accepted/bounty
10年前
記事のアイキャッチ画像
ESLint 0.8.1 released
ESLint Blog
Bug FixesFix: Ensure exit code is 1 when there’s a syntax error (fixes #1239) (Nicholas C. Zakas)Fix: vars-on-top directive support (fixes #1235) (Michael Ficarra)Fix: Avoid mutating node.range in max-len (fixes #1224) (Brandon Mills)EnhancementsUpdate: space-in-brackets to allow exceptions (fixes #1142) (Brandyn Bennett)DocumentationDocs: fix up vars-on-top documentation (fixes #1234) (Michael Ficarra)Docs: Typo, add missing quotation mark (Ádám Lippai)
10年前
記事のアイキャッチ画像
ESLint 0.8.0 released
ESLint Blog
HighlightsThis is a summary of the major changes you need to know about for this version of ESLint.PluginsThis is the first version of ESLint that formally supports shareable plugins. Currently, plugins allow you to bundle several rules together and publish them on npm. This allows you to share groups of rules easily with others. Creating plugins is very simple:Create an npm package with the name eslint-plugin-{your plugin name} such as eslint-plugin-foo.Export an object that has a rules property. The rules property should contain keys that are your rule IDs and values that are the rule implementation.For more information, see the plugins documentation.Ignore filesDue to some feedback we received regarding .eslintignore files, we have decided to automatically duplicate and append /** to every entry in the file. This is to address the issue where simple directory names would not match files within that directory. For example, using node_modules/ would not ignore all files in node_module
10年前
記事のアイキャッチ画像
ESLint 0.7.4 released
ESLint Blog
Bug FixesFix: Transform envs option to object in Config (Fixes #1064) (jrajav)DocumentationDocs: Fix ‘lintinging’ typo and ref links (Tom Vincent)
10年前
記事のアイキャッチ画像
ESLint 0.7.3 released
ESLint Blog
Bug FixesUpdate: Address code review comment for strict rule (refs #1011) (Nicholas C. Zakas)Fix: Avoid double warnings for strict rule (fixes #1011) (Nicholas C. Zakas)Fix: Check envs for true/false (Fixes #1059) (jrajav)DocumentationDocs: Update copyright policy (Nicholas C. Zakas)Docs: Update documentation for max-len to include description of second option (fixes #1006) (Nicholas C. Zakas)
10年前
記事のアイキャッチ画像
ESLint 0.7.2 released
ESLint Blog
Bug FixesFix: no-mixed-spaces-and-tabs incorrectly flagging multiline comments (fixes #1055) (Nicholas C. Zakas)Fix: new-cap error that throws on non-string member (fixes #1053) (Nicholas C. Zakas)Fix: Always make globals an object (Fixes #1049) (jrajav)
10年前
記事のアイキャッチ画像
ESLint 0.7.1 released
ESLint Blog
Due to npm’s security restrictions, we aren’t allowed to push a new 0.7.0 to the npm registry, which is why this version is 0.7.1.HighlightsThis is a summary of the major changes you need to know about for this version of ESLint..eslintignore ChangeAs we announced previously, the JSON format for .eslintignore files has been removed. Make sure to update your .eslintignore files appropriately.Configuration Changes0.7.1 formalizes how configuration works when there are multiple .eslintrc files. We have implemented configuration cascading, meaning that a .eslintrc file automatically inherits the settings from the .eslintrc file in its ancestor directories. This is how configuration was always envisioned to work in ESLint, but there were several bugs in the functionality. Because these bugs have been fixed, you may notice some different behavior with your current configuration settings. For more information on the configuration hierarchy, see the Configuration documentation.no-yoda is now y
10年前
記事のアイキャッチ画像
Formatter Breaking Change
ESLint Blog
What’s ChangingUp until this point, formatters were passed a config object that contained the calculated severity for each rule (error or warning) so that this information could be output. With 0.7.1, the severity will now be represented on each message itself as a severity property. All of the built-in formatters have been updated to reflect this change.Why Change?There were several bugs related to rules being output with the incorrect severity. The most recent was #983, which led to the discovery that the config object being passed around didn’t take into account inline rule severity changes. #985 implemented a change that placed the severity of the message directly onto the message object, meaning the config object was no longer necessary.The original plan was to deprecate the usage of the config object in formatters for 0.7.1 and remove it in 0.8.0. However, a major refactoring (#1013) led to a separation of responsibilities that made keeping this functionality as-is extremely diff
10年前
記事のアイキャッチ画像
ESLint 0.6.2 released
ESLint Blog
Deprecation NoticesReminder: The 0.6.x ESLint will be the last to support the deprecated JSON format for .eslintignore. This was deprecated in 0.5.1 and will be removed in 0.7.0. Please change your .eslintignore files to the new plain-text format. See #761.Complete ChangelogThe following is the complete list of changes in this version:Fix: Adding per-environment rule configs to docs and doc validation (Fixes #918) (jrajav)Docs: Updated contribution guidelines (Nicholas C. Zakas)Docs: Update description of eqeqeq to mention special cases (fixes #924) (Nicholas C. Zakas)Fix: block-scoped-var CatchClause handling (fixes #922) (Michael Ficarra)Fix: block-scoped-var respects decls in for and for-in (fixes #919) (Michael Ficarra)Update: Implement eqeqeq option “allow-null” (fixes #910) (Michał Gołębiowski)Fix: new-cap should allow non-alpha characters (fixes #897) (Michael Ficarra)Update: Refactor ESLintTester to fix dependency hell (fixes #602) (Nicholas C. Zakas)Fix: Merge configs with an
10年前
記事のアイキャッチ画像
ESLint 0.6.1 released
ESLint Blog
Deprecation NoticesReminder: The 0.6.x ESLint will be the last to support the deprecated JSON format for .eslintignore. This was deprecated in 0.5.1 and will be removed in 0.7.0. Please change your .eslintignore files to the new plain-text format. See #761.UpgradesOptionator to 0.4.0 (#885)Complete ChangelogThe following is the complete list of changes in this version:Upgrade: Optionator to 0.4.0 (fixes #885) (Nicholas C. Zakas)
11年前
記事のアイキャッチ画像
ESLint 0.6.0 released
ESLint Blog
Deprecation NoticesThe 0.6.x ESLint will be the last to support the deprecated JSON format for .eslintignore. This was deprecated in 0.5.1 and will be removed in 0.7.0. Please change your .eslintignore files to the new plain-text format. See #761.Breaking Changesbrace-style now disallows block statements where curlies are on the same line. While not strictly a breaking change, it is a significant enough change to warrant being called out in this way. (#758)Node 0.8.x is no longer officially supported as of 0.6.0. We will no longer accept or fix bugs for Node 0.8.x.RulesBreaking: brace-style now disallows block statements where curlies are on the same line. While not strictly a breaking change, it is a significant enough change to warrant being called out in this way. (#758)New: default-case (#787)New: no-new-require (#847)New: space-after-keywords (#807)New: no-lonely-if (fixes #790) (Brandon Mills)New: no-restricted-modules (#791)New: no-inner-declarations (#587)Update: The default va
11年前
記事のアイキャッチ画像
ESLint 0.5.1 released
ESLint Blog
Deprecation NoticesWith this release, we are deprecating the JSON format for .eslintignore in favor of a plain-text format. The change was made in a backwards-compatible way, but JSON support will be removed in the future, so you should start converting your .eslintignore. See #761.Complete ChangelogThe following is the complete list of changes in this version:Fix general config not to be modified by comment config in files (fixes #806) (Aliaksei Shytkin)Docs: SVG badges (Ryuichi Okumura)fixes #804: clean up implementation of #803 (which fixed #781) (Michael Ficarra)Build: Fix perf test to take median of three runs (fixes #781) (Nicholas C. Zakas)Fix: --reset will now properly ignore default rules in environments.json (fixes #800) (Nicholas C. Zakas)Docs: Updated contributor guidelines (Nicholas C. Zakas)Added Mocha global variables for TDD style. Fixes #793. (Golo Roden)Rule: no-sequences (fixes #561) (Brandon Mills)Change .eslintingore to plain text (fixes #761) (Brandon Mills)Change
11年前
記事のアイキャッチ画像
ESLint 0.5.0 released
ESLint Blog
Special thanks to Brandon Mills and George Zahariev for their working on making the CLI even more awesome, and Michael Ficarra for his help and advice on improving runtime performance.Breaking ChangesIn previous versions, ESLint would read /*jshint node:true*/ and /*jslint node:true*/ to set the environment in files. This feature was undocumented and has been replaced with /*eslint-env node */ to set the environment in files. See #759.The 0.4.x releases of ESLint had a licensing issue with a dependency of Optionator that was had no license applied to it, making ESLint’s license picture a bit muddy. We upgraded to the latest version of Optionator, in which the offending module has been removed, returning ESLint’s license to pristine shape. Even though functionality did not change due to this, the license story for ESLint did, and so we consider it a breaking change.New RulesRule: valid-typeof by Ian Christian MyersRule ChangesFix: Make sure no-path-concat doesn’t flag non-concat operati
11年前
記事のアイキャッチ画像
ESLint 0.4.5 released
ESLint Blog
Breaking ChangesThere are no breaking changes in this release.Complete ChangelogThe following is the complete list of changes in this version:Build: Add perf check into Travis build to better monitor performance regressions (fixes #732) (Nicholas C. Zakas)Fix: Make sure semi reports correct location of missing semicolon (fixes #726) (Nicholas C. Zakas)Add --no-eslintrc cli flag (ref #717) (Brandon Mills)Fix #716 crash with reset flag (Brandon Mills)Docs: Fixed JSON formatting and highlighting (Anton Rudeshko (Tesla))fixes #723: block-scoped-var throws on unnamed function expression (Michael Ficarra)Fix: Make stroustrup brace-style closing message make sense (fixes #719) (Nicholas C. Zakas)Fix: no-comma-dangle reports correct line number (Andrey Popp)Upgrade: Esprima to 1.1.1 and EScope to 1.0.1 (fixes #718) (Nicholas C. Zakas)CLI: Add reset cli flag (refs #692) (Brandon Mills)Relax eqeqeq null check (fixes #669) (Brandon Mills)New Rule: handle-callback-err (fixes #567) (Jamund Ferguson
11年前
記事のアイキャッチ画像
ESLint 0.4.4 released
ESLint Blog
Breaking ChangesThere are no breaking changes in this release.Complete ChangelogThe following is the complete list of changes in this version:Fix no-used-vars to report FunctionExpression params (fixes #697). (Andrey Popp)fixes #711: eslint reports wrong line number for files with shebang (Michael Ficarra)Fix for no-unused-vars and MemberExpression (Andrey Popp)added no-warning-comments rule (Alexander Schmidt)fixes #699: brace-style does not check function expressions (Michael Ficarra)rewrite block-scoped-var (Michael Ficarra)recommend using hasOwnProperty from Object.prototype in guard-for-in docs (Michael Ficarra)change conf/environments.json spacing to be simpler and more consistent (Michael Ficarra)Update API to use context.getFilename() instead of .filename. (Loren Segal)Small changes, JSDoc is clarified (Aliaksei Shytkin)Move FileFinder to separate file (Aliaksei Shytkin)Cache if file is not found (Aliaksei Shytkin)Use cache on config files seach (Aliaksei Shytkin)Added .eslinti
11年前
記事のアイキャッチ画像
ESLint 0.4.3 released
ESLint Blog
Breaking ChangesThere are no breaking changes in this release.Complete ChangelogThe following is the complete list of changes in this version:fixes #682: rewrite no-constant-condition rule (Michael Ficarra)Fixes #673 allow configuration of @return errors via requireReturn - (fixes #673) (Brian Di Palma)Tweaking inline code formatting for “if, while, dowhile” (Peter deHaan)Fixes #677 getJSDocComment() should not search beyond FunctionExpression or FunctionDeclaration parent nodes. (Brian Di Palma)Relaxed enforcement of camelcase rule (Ian Christian Myers)Fixing issue #675. Incorrect triggering of no-else-return rule. (Brian Di Palma)Added style option for wrap-iife (Mathias Schreck)Fix: Issues with named function expressions in no-unused-vars and no-shadow (fixes #662) (Nicholas C. Zakas)Update: camelcase rule now doesn’t flag function calls (fixes #656) (Nicholas C. Zakas)Updating documentation description for: no-space-before-semi rule, changing rules to exempt strings with semicolons
11年前
記事のアイキャッチ画像
ESLint 0.4.2 released
ESLint Blog
Breaking ChangesThere are no breaking changes in this release.Complete ChangelogThe following is the complete list of changes in this version:fixes #651: disable no-catch-shadow rule in node environment (Michael Ficarra)Fixed context.report message parsing (fixes #650) (Ian Christian Myers)fixes #648: wrap-iife rule should actually check that IIFEs are wrapped (Michael Ficarra)Added “stroustrup” option for brace-style (Ian Christian Myers)
11年前
記事のアイキャッチ画像
ESLint 0.4.0 released
ESLint Blog
Configuration FilesConfiguration files can now be written in YAML. This includes .eslintrc files.All configuration files can be in either JSON or YAML format, no special indicator of the format is necessaryCoreBreaking Change: Changed :after in node selectors to be :exit insteadSwitch to using optionator instead of optimist for CLI inputSplit out ESLintTester into its own repository (https://github.com/eslint/eslint-tester)CLI used to output a single blank line when there were no errors, now it doesn’t output anything in this casePerformanceImplementing benchmarks to help identify performance bottlenecksRefactoring allowed a 400-700ms improvement on our benchmarksRulesBreaking Change: unnecessary-strict rule was renamed to no-extra-strictBreaking Change: regex-spaces rule was renamed to no-regex-spacesBreaking Change: no-new-array rule was renamed to no-array-constructorNew Rule: valid-jsdoc (fixes #536) (Nicholas C. Zakas)New Rule: func-names (fixes #595) (Kyle Nunery)New Rule: no-ext
11年前
記事のアイキャッチ画像
ESLint 0.3.0 released
ESLint Blog
Configuration FilesBreaking Change: Removed the ability to use JavaScript as a configuration file format (more info)Added the ability to use JavaScript-style comments in configuration files.Added support for .eslintignore filesAllow configuration files to have any extension and assume they contain JSONFormattersBreaking Change: Switched to using stylish format as the default for ESLint (more info)Merged stylish formatter into the main repositoryAdded the rule ID to all formatter output to more easily identify which rule is causing a warningCoreAdded the ability to traverse comment nodes in rulesIgnore shebangs in JavaScript files so ESLint can validate all Node.js filesRulesBreaking Change: unnecessary-strict rule was renamed to no-extra-strictno-empty now disallows empty catch blocks when a finally block is presentno-unused-vars was incorrectly reporting function expressions weren’t used when method calls were made on them - this was fixedbrace-style was incorrectly reporting a violat
11年前
記事のアイキャッチ画像
Breaking change to ESLint config files
ESLint Blog
In previous versions of ESLint, it was possible to use JavaScript files as configuration files on the command line, such as:eslint -c config.js file-to-lint.jsConfiguration files written in JavaScript looked like this:module.exports = { rules: { semi: 2 }};The capability to use JavaScript files as configuration files is being removed in version 0.3.0. All configuration files must be in JSON format from now on.Why the change?The ability to use JavaScript configuration files was an unintended consequence of using require() as a shortcut for loading JSON files. Because require() will automatically parse files ending with a .json extension into JSON objects, this shortcut was used as a convenience. Unfortunately, this also limited the ability to name configuration files with a different extension (see related issue).Since JavaScript configuration files were never officially supported, and JSON files are supposed to be the format of choice for configuration files in ESLint, we made the deci
11年前
記事のアイキャッチ画像
Breaking change to ESLint default formatter
ESLint Blog
Up until this point, the default formatter was the “compact” formatter, which outputs data such as:foo.js: line 5, col 10, Error - Unexpected foo. (foo)foo.js: line 6, col 11, Warning - Unexpected bar. (bar)\n\n2 problemsBeginning with the next version of ESLint, the default formatter will be “stylish”, and that outputs information such as:foo.js 5:10 error Unexpected foo foo 6:11 warning Unexpected bar bar2 problemsWe think the stylish formatter is a much better user experience for those using the command line manually, making it easier to see which files are causing which problems.What breaks?It has come to our attention that some tools are using ESLint on the command line, assuming that the compact formatter is being used, and then processing that information into another format. If you are using ESLint in this way, you should update your tool immediately to specify the compact formatter instead of just using the default:eslint -f compact foo.jsThis works equally well with older and
11年前