4.0.0 • Published 2 years ago

@movable/template-lint-plugin v4.0.0

Weekly downloads
56
License
MIT
Repository
-
Last release
2 years ago

@movable/template-lint-plugin

CI

This is a collection of custom ember-template-lint rules written for and used at Movable Ink.

Rules

NameDescription
no-expression-like-stringsCatch strings that you probably meant to be Handlebars expressions
no-forbidden-elementsCatch <b>, <i> that you probably meant to be <strong>, <em> expressions
require-purgeable-class-namesRequire class names are written such that they can be detected by PurgeCSS

Configurations

The following sets of rules are available for your ember-template-lint configuration to extend from:

NameDescription
avoid-possible-typosRules meant to catch possible typos in your templates
avoid-deprecated-elementsRules meant to catch <b> and <i> tags, use <strong> and <em>
svg-aria-requiredRules meant to catch svgs without an aria-label or aria-labelledby
baseThe base set of rules used across all Movable Ink projects

Usage

Start with installing this package into your Ember application

yarn add -D @movable/template-lint-plugin

Then, include the plugin in your .template-lintrc.js

// .template-lintrc.js

module.exports = {
  plugins: ['@movable/template-lint-plugin'],

  extends: [
    // You can extend a whole set of rules
    '@movable/template-lint-plugin:avoid-possible-typos',
    '@movable/template-lint-plugin:avoid-deprecated-elements',
    '@movable/template-lint-plugin:svg-aria-required',
  ],

  rules: [
    // ... Or just the ones you want
    ('no-expression-like-strings': true),
  ],
};
4.0.0

2 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.1.0

4 years ago

1.0.0

5 years ago