eslint-frontmatter

Plugin to allow YAML frontmatter to be ignored by ESLint

MIT License

Downloads
229
Stars
0
Committers
2

eslint-plugin-frontmatter2

Plugin to allow YAML frontmatter to be ignored by ESLint


---
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 Rankings
Top 37.25% on Npmjs.org
Badges
Extracted from project README
CodeQL GitHub license GitHub last commit GitHub release GitHub Sponsors npm npm GitHub followers Twitter Follow Donate using Liberapay