@snowflake/eslint-plugin-stellar
v0.51.2
Published
An eslint plugin to help you use the Stellar design system.
Readme
@snowflake/eslint-plugin-stellar
An eslint plugin to help you use the Stellar design system.
Installation
npm install --save-dev @snowflake/eslint-plugin-stellarUsage
ESLint v8 (Legacy Config)
Add to your .eslintrc.js or .eslintrc.json:
// .eslintrc.js
module.exports = {
plugins: ['@snowflake/stellar'],
rules: {
'@snowflake/stellar/tokens': 'error',
},
};ESLint v9+ (Flat Config)
Add to your eslint.config.js:
import stellarPlugin from '@snowflake/eslint-plugin-stellar';
export default [
{
plugins: {
'@snowflake/stellar': stellarPlugin,
},
rules: {
'@snowflake/stellar/tokens': 'error',
},
},
];Or use the recommended flat config:
import stellarPlugin from '@snowflake/eslint-plugin-stellar';
export default [
stellarPlugin.configs.flat.recommended,
// your other config...
];Rules
tokens- A rule to enforce the usage of Stellar tokens.migrate-balto-packages- A migration rule to move Balto package usage to Stellar mapped or legacy equivalents.
Development
Build
npm run buildTest
npm testWatch mode
npm run test:watch