@place-framework/code-config
v2.0.7
Published
Configuration for ESLint and Prettier.
Downloads
80
Readme
PLACE Code Config
Introduction
This configuration is my personal preferences, linters, and rules when it comes to writing frontend code. It is entirely optional to use in conjunction with your project, and is the baseline default option for the PLACE Webpack Preset.
Implementation
The following configuration files for each formatting system are as follows:
babel.config.js
- Key:
BABEL_CONFIG
- Key:
eslint.config.js
- Key:
ESLINT_CONFIG
- Key:
prettier.config.js
- Key:
PRETTIER_CONFIG
- Key:
stylelint.config.js
- Key:
STYLELINT_CONFIG
- Key:
Simple Example:
// prettier.config.js
const PRETTIER_CONFIG = require('@place-framework/code-config').PRETTIER_CONFIG;
module.exports = PRETTIER_CONFIG;
Complex Example:
// eslint.config.js
const ESLINT_CONFIG = require('@place-framework/code-config').ESLINT_CONFIG;
module.exports = [
{
files: ['**/*.js'],
plugins: {
...ESLINT_CONFIG.plugins.stylistic
},
rules: {
...ESLINT_CONFIG.configs.base.rules,
...ESLINT_CONFIG.configs.stylistic.rules
}
}, ESLINT_CONFIG.configs.prettier
];