@place-framework/code-config

2.0.7 • Public • Published

PLACE Framework Header

PLACE Code Config

PLACE Framework Ecosystem Diagram

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
  • eslint.config.js
    • Key: ESLINT_CONFIG
  • prettier.config.js
    • Key: PRETTIER_CONFIG
  • stylelint.config.js
    • Key: STYLELINT_CONFIG

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
];

Readme

Keywords

none

Package Sidebar

Install

npm i @place-framework/code-config

Weekly Downloads

3

Version

2.0.7

License

ISC

Unpacked Size

7.52 kB

Total Files

25

Last publish

Collaborators

  • valespring