@sjmdev/sjm-configs

0.1.2 • Public • Published

SJM Configs

Table of Contents

About

SJM Configs contains shared configuration files which are consumed by a variety of SJM projects.

Installation

Install sjm-configs via npm package registry as follows:

npm install --save-dev @sjmdev/sjm-configs

Setup

Import the sjm-configs module into a given file as follows:

const sjmConfigs = require( '@sjmdev/sjm-configs' );

Usage

Data

Raw configuration data can be accessed via the sjmConfigs object as follows:

// Using property access:
const eslintConfig = sjmConfigs.eslintConfig;

// Using object destructuring:
const { eslintConfig } = sjmConfigs;

Paths

sjm-configs also exposes a paths object, where each key is an absolute path to the corresponding configuration file. The paths object can be accessed as follows:

// Using property access:
const sjmConfigPaths = sjmConfigs.paths;
const eslintConfigPath = sjmConfigPaths.eslintConfig;

// Using object destructuring:
const { paths: sjmConfigPaths } = sjmConfigs;
const { eslintConfig: eslintConfigPath } = sjmConfigPaths;

Configuration Files

Overview

This section outlines all configuration files which are present within the sjm-configs module. See individual entries for details.

List

ESLint

Used by ESLint to enforce consistency and best practices within JavaScript files.

Configuration File: .eslintrc.json Data Exposed As: eslintConfig File Path Exposed As: paths.eslintConfig

SASS Lint

Used by SASS Lint to enforce consistency and best practices within SASS/SCSS files.

Configuration File: .sass-lint.json Data Exposed As: sassLintConfig File Path Exposed As: paths.sassLintConfig

PHP Code Sniffer

Used by PHP_CodeSniffer to enforce consistency and best practices within PHP files.

NOTE: Currently, this configuration file is not exposed as part of the sjm-configs public API.

Configuration File: ruleset.xml Data Exposed As: n/a File Path Exposed As: n/a

Documentation

Currently, SJM Configs does not include any external documentation.

For an overview of the project's evolution, please consult the CHANGELOG.

Testing

Providing that all development dependencies have been installed, the sjm-configs test suite can be run as follows:

npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i @sjmdev/sjm-configs

Weekly Downloads

0

Version

0.1.2

License

ISC

Unpacked Size

21.5 kB

Total Files

9

Last publish

Collaborators

  • hoomanb
  • pcameron_stjoseph
  • nathanfoon
  • jrmykolyn
  • tburden