
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
Easy to use eslint(support TypeScript) / stylelint / prettier / commitlint in rax, ice and react project. And spec means specification.
$ npm i --save-dev @iceworks/spec eslint stylelint prettier @commitlint/cli
PS: You don't need to install other eslint plugins and parsers.
First create a .eslintrc.js file. Then edit your config.
rules base on eslint-config-ali and @iceworks/eslint-plugin-best-practices.
// .eslintrc.js
const { getESLintConfig } = require('@iceworks/spec');
// getESLintConfig(rule: 'common'|'rax'|'react'|'vue' , customConfig?);
module.exports = getESLintConfig('common');
rules base on eslint-config-ali and @iceworks/eslint-plugin-best-practices.
// .eslintrc.js
const { getESLintConfig } = require('@iceworks/spec');
// getESLintConfig(rule: 'common-ts'|'rax-ts'|'react-ts'|'vue-ts', customConfig?);
module.exports = getESLintConfig('common-ts');
First create a .stylelintrc.js file. Then edit your config.
rules base on stylelint-config-ali
// .stylelintrc.js
const { getStylelintConfig } = require('@iceworks/spec');
// getStylelintConfig(rule: 'common'|'rax'|'react'|'vue', customConfig?);
module.exports = getStylelintConfig('react');
First create a .prettierrc.js file. Then edit your config.
// .prettierrc.js
const { getPrettierConfig } = require('@iceworks/spec');
// getPrettierConfig(rule: 'common'|'rax'|'react'|'vue', customConfig?);
module.exports = getPrettierConfig('react');
First create a .commitlintrc.js file. Then edit your config.
rules base on commitlint-config-ali
// .commitlintrc.js
const { getCommitlintConfig } = require('@iceworks/spec');
// getCommitlintConfig(rule: 'common'|'rax'|'react'|'vue', customConfig?);
module.exports = getCommitlintConfig('react');
// .eslintrc.js
const { getESLintConfig } = require('@iceworks/spec');
// getESLintConfig(rule: 'common'|'rax'|'react'|'vue', customConfig?);
module.exports = getESLintConfig('rax', {
// custom config it will merge into main config
rules: {
// ...
},
});
Add scripts in your package.json, example:
"scripts": {
"lint": "npm run eslint && npm run stylelint",
"eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./",
"stylelint": "stylelint ./**/*.scss",
"prettier": "prettier **/* --write"
}
Then use npm run lint check your project, ues npm run prettier update your code.
To lint commits before they are created you can use Husky's Git hook.
Install in your project npm install husky --save-dev or yarn add -D husky.
After that, we recommend you to see husky docs, then create "commit-msg" and "pre-commit" config.
If you are using @ice/spec in your project, we recommend use @iceworks/spec to get better maintainability and faster response to lint rules support.
Based on @iceworks/spec's simple API you can quickly migrate your project, install and update your lint config file, the mission is completed 😁.
Eslint is not yet supported having plugins as dependencies in shareable config. issue. As a temporary solution, you need add the plugin to devDependencies in your project, like npm i --save-dev eslint-plugin-jsx-a11y.
TypeScript project run lint file when see this error, you can update your tsconfig.json.
update src/* to src/**/*:
{
"include": ["src/**/*"]
}
Enjoy!
FAQs
a package for mucfc
We found that mucfc-spec demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.