Design System ESLint Package #4525
Replies: 3 comments 13 replies
-
Resolution: We will creat two ESLint packages that will be part of the SwissPost Design System:
All names are subject to change. |
Beta Was this translation helpful? Give feedback.
-
@alizedebray should we follow the naming conventions suggested (not enforced) by eslint (https://eslint.org/docs/latest/extend/plugins#meta-data-in-plugins) for our external packages? That would be |
Beta Was this translation helpful? Give feedback.
-
@gfellerph @oliverschuerch To sum up with what we just defined, for us this would mean: Do we agree? |
Beta Was this translation helpful? Give feedback.
-
Context
The configuration of ESLint has changed significantly in recent versions. It has shifted from the Classic Configuration to the Flat Configuration, which has impacted how ESLint plugins are developed.
Glossary
To help make the discussion easier to follow, let's define a few key ESLint terms:
Classic vs. Flat Config: Quick Overview
Classic Config
In the classic config, each ESLint plugin (or parser) was referenced by the name of the package that contained it. This meant that for each plugin or parser you wanted to offer, you had to create a separate package.
Flat Config
The flat config is more flexible. It’s a JavaScript file where you can import the plugins, configs, and parsers you need as objects (instead of as strings). This means that newer ESLint packages can export multiple plugins, configs, and parsers within a single package.
Discussion Points
Plugin Grouping
In our Design System, ESLint can serve two purposes:
Questions:
Naming Convention
We need to establish a clear naming convention for all parts of the ESLint package:
@swisspost/design-system-eslint
)post/eslint-plugin
,post/eslint-plugin-migration
)post/migration
,post/migration/template
)Ressources:
Beta Was this translation helpful? Give feedback.
All reactions