
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
eslint-config-vaadin
Advanced tools
ESLint shareable config for the Vaadin JavaScript style guide
npm install --save-dev eslint-config-vaadin
or
yarn add --dev eslint-config-vaadin
After you have installed eslint-config-vaadin
, you should be able to extend the following configs in the extends
section of your ESLint configuration.
A config that contains the JavaScript linting rules.
This config requires vaadin/prettier
which must be added after any other configs.
{
extends: [
'vaadin/javascript',
// ... other project configs
'vaadin/prettier',
],
}
A config that extends vaadin/javascript
with the TypeScript linting rules.
This config requires vaadin/prettier
which must be added after any other configs.
{
extends: [
'vaadin/typescript',
// ... other project configs
'vaadin/prettier',
],
}
A config that extends vaadin/typescript
with the TypeScript linting rules that require type information.
Please note that adding this config to your project can significantly affect linting performance since it requires TypeScript to build the whole project before ESLint can do its linting.
This config requires tsconfig.json
at the project root with the include
section that includes all the files that are referenced in your project. If your tsconfig.json
is located somewhere other than the project root, you can use the parserOptions.project
property.
This config requires vaadin/prettier
which must be added after any other configs.
{
parserOptions: {
project: 'path/to/your/tsconfig.json',
},
extends: [
'vaadin/typescript-requiring-type-checking',
// ... other project configs
'vaadin/prettier',
],
}
A config that contains the linting rules for tagged Lit templates.
This config is designed on top of the eslint-plugin-lit
plugin.
This config is supposed to be used in combination with vaadin/javascript
or vaadin/typescript
.
{
"extends": ["vaadin/lit"]
}
A config that contains the linting rules for imports.
This config is designed on top of the eslint-plugin-import
plugin. Please note that adding this config to your project can significantly affect linting performance.
This config is supposed to be used in combination with vaadin/javascript
or vaadin/typescript
.
{
"extends": ["vaadin/imports"]
}
A config that overrides some linting rules and sets up the eslint-plugin-chai-friendly
plugin for test files.
This config is supposed to be used in combination with vaadin/javascript
or vaadin/typescript
.
{
"extends": ["vaadin/testing"]
}
A config that enables alphabetical sorting for objects, enums, JSX props, and exports. It serves as a substitute for the ESLint sort-keys
rule, which lacks an auto-fixer. Please be aware that the ESLint team has a significant reason for not implementing an auto-fixer for this rule (see here). Use the config with caution.
{
"extends": ["vaadin/sort"]
}
{
"extends": ["vaadin/javascript", "vaadin/lit", "vaadin/testing", "vaadin/prettier"]
}
{
"extends": ["vaadin/typescript", "vaadin/lit", "vaadin/testing", "vaadin/prettier"]
}
Or, you can use a more strict config that requires type information:
{
"extends": ["vaadin/typescript-requiring-type-checking", "vaadin/lit", "vaadin/testing", "vaadin/prettier"]
}
Apache License 2.0
FAQs
Vaadin base JS/TS ESLint config
The npm package eslint-config-vaadin receives a total of 1,385 weekly downloads. As such, eslint-config-vaadin popularity was classified as popular.
We found that eslint-config-vaadin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.