Shareable lint configs for Discourse core, plugins, and themes
npm install @discourse/lint-configsShareable lint configs for Discourse core, plugins, and themes
Add @discourse/lint-configs to package.json, and create these three files:
``js`
import DiscourseRecommended from "@discourse/lint-configs/eslint";
export default [...DiscourseRecommended];
or in themes/theme components:
`js`
import DiscourseThemeRecommended from "@discourse/lint-configs/eslint-theme";
export default [...DiscourseThemeRecommended];
`js`
module.exports = require("@discourse/lint-configs/prettier");
`js`
export default {
extends: ["@discourse/lint-configs/stylelint"],
};
`js``
module.exports = require("@discourse/lint-configs/template-lint");