Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-hashicorp-lint-setup-ember

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-hashicorp-lint-setup-ember

Automatically sets up a HashiCorp linting configuration for Ember.js apps or addons

  • 1.0.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

create-hashicorp-lint-setup-ember

Automatically sets up a linting configuration for an Ember.js app or addon using HashiCorp's eslint and ember-template-lint configs.

Usage

In the root folder of the app or addon you're working on, run the following command and follow the prompts:

yarn create hashicorp-lint-setup-ember

This will install the necessary dependencies and create or update the necessary files. Note that this does not install HashiCorp's prettier configuration, you will have to do that yourself as a separate step.

Adding globals

The .eslintrc.js file structure that is needed for this linting setup to work makes adding globals in the usual way difficult. Instead, if you want to add globals, create a file .eslintrc.globals.js that contains your eslint globals, which you can then require this file as needed in lower level .eslintrc.js files. For instance:

// .eslintrc.globals.js
module.exports = {
  globals: {
    MY_AWESOME_GLOBAL: true,
  },
};
// addon/.eslintrc.js
module.exports = {
  root: true,
  extends: [
    '@hashicorp/eslint-config-ember',
    require.resolve('../.eslintrc.globals.js'),
  ],
};
// tests/.eslintrc.js
module.exports = {
  root: true,
  extends: [
    '@hashicorp/eslint-config-ember/test',
    require.resolve('../.eslintrc.globals.js'),
  ],
};

What does it install?

It installs the following packages:

Moreover, it sets up various .eslintrc.js files and one .template-lintrc.js file, depending on your answers to the prompts.

If you're setting up an addon, the files generated will be:

.
├── .eslintrc.js [eslint-config-node]
├── .template-lintrc.js
├── addon
│   └── .eslintrc.js [eslint-config-ember]
├── app
│   └── .eslintrc.js [eslint-config-ember]
└── tests
    ├── .eslintrc.js [eslint-config-ember/test]
    └── dummy
        └── config
            └── .eslintrc.js [eslint-config-node]

If you're setting up an app, they will be:

.
├── .eslintrc.js [eslint-config-node]
├── .template-lintrc.js
├── app
│   └── .eslintrc.js [eslint-config-ember]
└── tests
    └── .eslintrc.js [eslint-config-ember/test]

If you've selected to use TypeScript, the files will be set up with their respective TypeScript configurations, rather than the standard vanilla JavaScript configurations.

Keywords

FAQs

Package last updated on 06 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc