Development Standards
The development standards for this project have been extracted into an independent sub-repository. Developers can view the source code and make corresponding customizations in packages/spec
. The following sections introduce the usage and basic standards.
Getting Started
JavaScript Project Configuration:
// .eslintrc.js
module.exports = {
root: true,
extends: [require.resolve("@milesight/spec/src/eslint-config/base")],
};
TypeScript Project Configuration:
// .eslintrc.js
module.exports = {
root: true,
extends: [
require.resolve("@milesight/spec/src/eslint-config/base"),
require.resolve("@milesight/spec/src/eslint-config/typescript"),
],
};
React + TypeScript Project Configuration:
// .eslintrc.js
module.exports = {
root: true,
extends: [
require.resolve("@milesight/spec/src/eslint-config/base"),
require.resolve("@milesight/spec/src/eslint-config/react-typescript"),
],
};
Stylelint Configuration:
// .stylelintrc.js
module.exports = {
extends: require.resolve("@milesight/spec/src/stylelint-config"),
};
Prettier Configuration:
// .prettierrc.js
module.exports = require("@milesight/spec/src/prettier-config");
Commitlint Configuration:
// .commitlintrc.js
module.exports = require("@milesight/spec/src/commitlint-config");