eslint-plugin-frontmatter2

1.0.0 • Public • Published

eslint-plugin-frontmatter2

Plugin to allow YAML frontmatter to be ignored by ESLint

CodeQL Node CI Lint Code Base

GitHub license GitHub last commit GitHub release GitHub Sponsors

npm node-current npm bundle size gzipped npm

GitHub followers GitHub forks GitHub stars Twitter Follow

Donate using Liberapay


---
foo: bar
number: 42
works: true
person:
  name: Chris
  age: 38
  developer: true
---

console.log('{{ foo }}');
console.log(JSON.parse('{{ person | jsonify }}'));

[!IMPORTANT] This plugin does not enable Liquid templating support in JavaScript. For this reason, it is advised that you enclose all such variables in quotes and treat them as strings, eg. foo('{{ bar }}'). You may use parseInt or JSON.parse as necessary from there.

Example Config File

import frontmatter from 'eslint-plugin-frontmatter2';

export default {
  'plugins': {
    'frontmatter2': frontmatter
  },
  processor: 'frontmatter/frontmatter',
};

Package Sidebar

Install

npm i eslint-plugin-frontmatter2

Weekly Downloads

24

Version

1.0.0

License

MIT

Unpacked Size

9.89 kB

Total Files

6

Last publish

Collaborators

  • shgysk8zer0