1.0.0 • Published 1 year ago
eslint-plugin-frontmatter2 v1.0.0
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 useparseInt
orJSON.parse
as necessary from there.
Example Config File
import frontmatter from 'eslint-plugin-frontmatter2';
export default {
'plugins': {
'frontmatter2': frontmatter
},
processor: 'frontmatter/frontmatter',
};
1.0.0
1 year ago