Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
amper-scripts
Advanced tools
⏩ some tools to make project setup easier
Using Yarn:
$ yarn add -D amper-scripts
…or using npm:
$ npm i --save-dev amper-scripts
A lot of setup is included, but you'll need to do a little setup. This is because your text editor likely expects config files to be in the project directory.
First, install using one of the commands above.
Add or update your .eslintrc.js
:
module.exports = require('amper-scripts/config/eslint');
Add or update your prettier.config.js
:
module.exports = require('amper-scripts/config/prettier.config.js');
Change scripts in your package.json
or CI/CD setup to run this instead of
eslint
or prettier
:
{
"scripts": {
"lint": "amper-scripts lint",
"format": "amper-scripts format-write",
"validate": "amper-scripts validate"
}
}
Most commands allow you to extend or opt-out of the default config. In most cases to opt-out, just write the config file as you normally would and it'll be picked up.
Example: Extending ESLint config:
module.exports = {
extends: [require.resolve('amper-scripts/config/eslint')],
rules: {
/* your custom rules */
}
// you can also change any other settings, such as `env`
};
Example: Extending Prettier config
const gsandfDefaults = require('amper-scripts/config/prettier.config.js');
module.exports = {
...gsandfDefaults
// your rules
};
If you ever forget what commands are available, just ask for help:
$ amper-scripts --help
If you need help on a specific command, run the help
script:
$ amper-scripts help [command]
Check project code formatting using Prettier and list any differing files:
$ amper-scripts format-check
Enforce code formatting using Prettier, overwriting differing files:
$ amper-scripts format-write
Or, just get vanilla Prettier with the default config and ignore applied:
$ amper-scripts format [arguments]
Override the Prettier config by adding any allowed config file. The configuration is not merged; any detected configuration file is used as the base.
Lint the project using ESLint:
$ amper-scripts lint
Override linting rules by adding any configuration file allowed by ESLint. The configuration is not merged; any detected configuration file is used as the base.
To extend the config in this repo, see "using different settings" above.
Additional arguments are passed to ESLint. For example, you can specify files to validate:
$ amper-scripts lint ./source
This runs commands to generally check the project (i.e. lint, format-check) all at once. This is good for CI servers because it's fast, exits if anything fails, and is oriented toward showing you where errors occur:
$ amper-scripts validate
You can opt-out of individual steps as needed:
$ amper-scripts validate --no-lint
Use amper-scripts help validate
for all available options.
FAQs
GS&F dev scripts
The npm package amper-scripts receives a total of 0 weekly downloads. As such, amper-scripts popularity was classified as not popular.
We found that amper-scripts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.