Dataset Viewer
Auto-converted to Parquet Duplicate
Question
stringlengths
45
232
Response
stringlengths
1
611
What is the minimum number of members required for a working group in the ESLint project?
Two members.
What pattern should be used in an ESLint configuration to ignore a specific directory but still allow for the inclusion of specific files within that directory?
"directory/**/*", "!directory/specificfile.js"
In ESLint's flat config, where should the `ecmaVersion` be specified to affect both syntax and global variables?
`languageOptions`
What is the default severity setting for reporting unused disable directives in ESLint, and what command line option can override it?
Default: "warn", Command line option: `--report-unused-disable-directives` or `--report-unused-disable-directives-severity`.
What condition must be met for the `isArgumentsMaterialized()` method to return `true` in the context of ESLint's `Scope` object?
The `isArgumentsMaterialized()` method returns `true` if this is a `"function"` scope which has used `arguments` variable.
What is the primary JavaScript syntax difference when importing plugins in flat config files compared to eslintrc files?
Eslintrc files use string-based imports, while flat config files use `require()` or `import` statements.
What ESLint feature allows configuration to specify shared data accessible to all rules within a plugin, referencing ESLint version 2023-10?
settings
What key functionality has replaced the `env` key in ESLint's flat config to manage global variables?
languageOptions.globals
What is the syntax for extending a specific configuration from an ESLint plugin and accessing its configurations directly in ESLint version 2023-10?
`plugins: { example: examplePlugin }, extends: [examplePlugin.configs.recommended]`
What is the primary method for specifying plugins in a flat config file for ESLint v9.x?
JavaScript objects (using `import` or `require`)
What ESLint version requires `sourceType` to be set to "script" when using `ecmaVersion` 3 or 5?
ESLint version 8.0.0
What is the monthly donation amount given by Icons8?
$200.00
What is the type of the `resolved` field in the `Reference` interface in ESLint?
Variable | null
Which tool is used by ESLint to streamline the development of new rules?
Yeoman
What is the importance of using the `files` key when extending configurations in ESLint?
Ensures the configuration applies to the correct files.
What property must be added to a custom processor in ESLint to enable autofix capabilities when using the --fix flag?
supportsAutofix: true
What command do you use to add the upstream source for the main ESLint repository?
git remote add upstream git@github.com:eslint/eslint.git
When using ESLint's flat config compared to eslintrc, what must be explicitly specified for a processor associated with a file extension?
The processor associated with a file extension must be explicitly set in the configuration.
What is the default glob pattern for configurations in ESLint's flat config files if the `files` property is not specified?
"**/*.{js,mjs,cjs}"
What is the return type of the isStatic() method in the context of ESLint?
boolean
In the ESLint Definition interface, what is the `parent` type for a `"Variable"` definition?
`VariableDeclaration`
What is the function of the `processor` key in ESLint flat config when using plugins?
It specifies a processor defined in a plugin to apply to specific files.
How do you create a runtime plugin in ESLint flat config to include custom rules directly in the configuration?
```json import myrule from "./custom-rules/myrule.js"; export default [ { files: ["**/*.js"], plugins: { custom: { rules: { myrule } } }, rules: { "custom/myrule": "error" } } ]; ```
What is considered a best practice when defining getter and setter pairs for the same property in JavaScript objects or classes according to ESLint v1.0.0?
Group accessor functions for the same property together.
What happens if you omit the `files` key when using the `extends` key in an ESLint configuration?
The extended configuration may end up applied to all files.
What is a selector in the context of ESLint, and how is its syntax similar to CSS selectors?
A selector in ESLint is a string used to match nodes in an Abstract Syntax Tree (AST). Its syntax is similar to CSS selectors.
What is recommended to provide for each configuration object to help identify it, especially in shared ESLint configurations?
The `name` property.
Which file in the ESLint directory structure acts as the entry point of `require("eslint")`?
lib/api.js
What does the ESLint `npm test` script generate for use in a browser?
build/eslint.js
What command option can be used to prevent ESLint from searching for a configuration file in the current directory and instead use a specified configuration file, such as "some-other-file.js"?
--config
What does the `suppressions` property in the `SuppressedLintMessage` type contain?
`{ kind: string; justification: string }[]`
What is the default glob pattern applied to configuration objects without a 'files' property in flat config files for ESLint?
**/*.{js,mjs,cjs}
What is the syntax for matching an AST node with a specific attribute value in ESLint version current as of the document provided?
[attr="value"]
What command should you use to run ESLint on multiple files with `bun` while ensuring the use of node `glob` syntax?
bunx eslint "lib/**"
How are custom runtime plugins loaded in a flat config for ESLint?
Custom runtime plugins in a flat config for ESLint are loaded directly in the config file by defining them as objects within the `plugins` key. You can import custom rules and assign them to a plugin name to use within the configuration.
What is the primary function of the `processor` key in the flat ESLint configuration?
To use a processor defined in a plugin.
In the context of using ESLint configuration files, which file type does ESLint prioritize last according to its default precedence order?
`eslint.config.cts`
What feature flag allows ESLint to search for configuration files beginning from the directory of the file being linted, rather than the current working directory?
unstable_config_lookup_from_file
What is the new method in ESLint v8.37.0 for retrieving the scope of a node, which requires passing the reference node?
`SourceCode#getScope(node)`
What utility does the `FlatCompat` class provide in transitioning from eslintrc to flat config in ESLint's new configuration system?
The `FlatCompat` class allows the use of eslintrc-style shared configs and settings within a flat config file for backwards compatibility during the transition to the new configuration system.
How does the flat config system in ESLint handle the `eslint-env` configuration comments differently than the eslintrc config system?
In the eslintrc config system, `eslint-env` configuration comments could define globals for a file. In the flat config system, these comments are no longer recognized and will be reported as errors in future versions of ESLint.
In ESLint flat config, under which key are the `globals` and `parserOptions` consolidated?
languageOptions
What is the role of the `cli` object in the ESLint architecture, version as referenced?
The `cli` object is the API for the command line interface, responsible for interpreting command line arguments, reading and writing to the file system, outputting to the console, using a formatter, and returning the correct exit code.
What is the primary function of the `Linter` object's `verify()` method in the ESLint architecture as referenced?
To lint source code by parsing it into an AST and applying rules to report issues.
What is the specificity rule for calling listeners when two ESLint selectors match the same AST node in the current version?
Increasing specificity. If tied, alphabetical order.
What ESLint selector can be used to disallow instances where `setTimeout` is called with a single argument in the current version?
CallExpression[callee.name='setTimeout'][arguments.length<2]
What are the valid data types for the "parameters" property in an ESLint FunctionDeclaration object?
integer, "first", "off"
What is the function of ESQuery within ESLint, and how does it interpret syntax?
ESQuery is a library used by ESLint to parse selector syntax for querying nodes in an AST. It interprets CSS syntax for AST node properties.
Which AST format is used by ESLint to represent code syntax?
ESTree
What is the command using Bun to specify multiple global variables for ESLint without allowing any writes?
bunx eslint --global require,exports file.js
How is specificity determined for AST selectors when multiple selectors match the same node in ESLint?
Specificity is determined by the number of class, attribute, and pseudo-class selectors. If tied, the number of node type selectors is considered. If still tied, alphabetical order is used.
How can the no-restricted-syntax rule in ESLint be configured to disallow `require()` calls?
```json { "rules": { "no-restricted-syntax": [ "error", "CallExpression[callee.name='require']" ] } } ```
What happens to `eslint-env` configuration comments in ESLint's flat config system?
In ESLint's flat config system, `eslint-env` configuration comments are no longer recognized and will be reported as errors in a future version. They should be removed or replaced with `global` configuration comments or `globals` definitions in the config file.
In ESLint's flat config, what is the equivalent method for importing global variables previously done with the `env` property in eslintrc files?
`globals` property with imports from the `globals` npm package.
What is the main responsibility of the `Linter` object in ESLint's architecture concerning AST traversal?
AST traversal.
What error message is reported if a `const` variable named `foo` is assigned a value other than "bar" in an ESLint rule for version 8.x?
Value other than "bar" assigned to `const foo`. Unexpected value: {{ notBar }}.
Who are the co-founders of Nx that supported ESLint as gold sponsors?
Jeff Cross, Victor Savkin
Who covered ESLint in an article about funding open source projects and is specifically mentioned in connection with Automattic's sponsorship?
Sarah Gooding
What is the primary purpose of using the `--ext` option in ESLint commands?
Specify additional file extensions to lint.
How are forward-slash characters in regular expressions handled in ESLint AST selectors to avoid syntax errors, given the known issue with esquery?
Replace the `/` character with its Unicode counterpart `\u002F`.
What is the syntax to select all `Identifier` nodes with a `VariableDeclarator` as a direct parent using ESLint selectors?
VariableDeclarator > Identifier
What is the npm package required to import predefined ESLint configurations in flat config files?
@eslint/js
Who is credited with nominating ESLint for Microsoft's FOSS Contributor Fund donation?
Jan Pilzer and Steve Faulkner
Which company is noted as ESLint's first platinum sponsor?
Automattic
How does the removal of the `env` key in ESLint flat config affect the management of global variables?
The removal of the `env` key in ESLint flat config shifts the responsibility of managing global variables to the user, who can now use the `globals` package directly to define global variables.
How does ESLint apply fixes automatically, and when might it not apply them in the current version of ESLint?
ESLint applies fixes automatically using the `--fix` flag. It might not apply fixes if they are unsafe or if the fixes fall under suggestions, which are manual.
What is the format used by ESLint to represent JavaScript syntax as an AST in the current version of ESLint?
ESTree
What is the requirement for an ESLint core rule proposal regarding ECMAScript feature stages for the rule to be accepted?
Stage 4 in the preceding 12 months.
What is a key responsibility of a contributor once a proposed ESLint rule is accepted?
Implementation and documentation of the rule.
Which rule type checks JavaScript code in ESLint for operational issues without modifying application logic?
Logical Rule
What utility is used to translate eslintrc format into flat config format in ESLint for version 8.39.0?
FlatCompat utility
In ESLint version 8.39.0, how can a config object be made to apply exclusively to test files using flat config?
```javascript { ...customTestConfig, files: ["**/*.test.js"], } ```
What key development did ESLint introduce in version 9.0.0 that was highlighted in the 2024 year in review?
Language plugins
What date was the postmortem for malicious ESLint packages published?
12 Jul, 2018
What key is used in ESLint's configuration file to specify the name of a processor for linting JavaScript code extracted from other kinds of files?
processor
What kind of ESLint rule can be written with an AST selector that matches all FunctionDeclaration nodes containing more than three parameters?
FunctionDeclaration[params.length>3]
How is selector specificity determined in ESLint when two selectors match the same node?
Increasing specificity. If tied, alphabetical order.
What feature does ESLint v9.24.0 introduce to allow enabling new lint rules as "error" while addressing existing violations at a later pace?
Bulk suppressions
What criteria must a proposed ESLint core rule meet regarding overlapping features with existing rules?
Unique and no conflicts.
What is the specific criterion for ESLint core rules regarding their applicability to specific libraries or frameworks?
Library agnostic.
How can you apply the `eslint-config-my-config` package in flat config if it's in eslintrc format using ESLint's FlatCompat utility?
import { FlatCompat } from "@eslint/eslintrc"; import path from "path"; import { fileURLToPath } from "url"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const compat = new FlatCompat({ baseDirectory: __dirname, }); export default [ ...compat.extends("eslint-config-my-config"), ];
What property in a flat ESLint configuration must be used to specify files and directories to ignore, given the lack of support for `.eslintignore` files in this configuration format?
ignores
What distinguishes ESLint suggestions from fixes, particularly in terms of application and availability?
Fixes are automatically applicable without changing application logic and can be applied through the ESLint CLI. Suggestions may change application logic, cannot be automatically applied, and are available only through editor integrations.
What is the role of the `preprocess` method in an ESLint custom processor, and what should it return?
The `preprocess` method returns an array of code blocks to lint, each containing `text` and `filename` properties.
What severity setting is equivalent to `true` for the `reportUnusedDisableDirectives` option in ESLint's configuration?
"warn"
What happens when two selectors with equal specificity match the same node in ESLint?
Alphabetical order.
What is a known issue with using regular expressions containing forward-slash characters in ESLint selectors?
Regular expressions with forward-slash characters aren’t properly parsed.
What modifier must be appended to a linter script in ESLint version X to allow automatic fixes of detected issues?
:fix
Which main script name in ESLint version X must begin scripts that have public side effects?
release
What new feature in ESLint v9.24.0 allows enabling lint rules as "error" without fixing all existing code violations immediately?
Bulk Suppressions
What is the function of a custom processor in ESLint's ecosystem?
An ESLint custom processor extracts JavaScript code from other file types or manipulates JavaScript code before parsing it with ESLint.
Which rule status setting in ESLint causes it to exit with a non-zero code during continuous integration testing?
"error" or `2`
In the flat config system for ESLint, how do you specify that dotfiles should be ignored, and what significant change does this represent from previous eslintrc behavior?
To ignore dotfiles in the flat config system, add `"**/.*"` to the `ignores` array. This represents a significant change because dotfiles are no longer ignored by default, unlike the previous eslintrc behavior.
What is the replacement for the `--no-eslintrc` CLI flag in the ESLint flat config system?
--no-config-lookup
What workaround is suggested for using forward-slash characters in regular expressions due to esquery bugs in ESLint selectors?
Replace the `/` character with its Unicode counterpart `\u002F`.
What naming convention is used for a file in the `lib/rules` directory when submitting a core rule to ESLint?
`rule-identifier.js`
What is a requirement for a new ESLint core rule to be accepted related to ECMAScript features?
Be related to an ECMAScript feature that has reached stage 4 in the preceding 12 months.
What modifier should be appended to a linter script name if it can automatically fix the issues it detects in ESLint?
:fix
What does setting the ESLint rule severity to `"warn"` imply in terms of code compliance and reporting?
Setting the ESLint rule severity to `"warn"` implies that the rule is turned on as a warning, which allows ESLint to report the rule's violations without affecting the exit code.
Which option allows ignoring camelcase style enforcement for ES2015 imports while still checking their use later in the code except function arguments?
`"ignoreImports": true`
End of preview. Expand in Data Studio

Samples in this benchmark were generated by RELAI using the following data source(s):

Data Source Name: ESLint 9.24 Documentation

Data Source Link: https://eslint.org/docs/latest

Data Source License: https://eslint.org/docs/latest

Data Source Authors: ESLint Team

AI Benchmarks by Data Agents © 2025 RELAI.AI · Licensed under CC BY 4.0. Source: https://relai.ai

Downloads last month
8