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.
import frontmatter from 'eslint-plugin-frontmatter2';
export default {
'plugins': {
'frontmatter2': frontmatter
},
processor: 'frontmatter/frontmatter',
};