Skip to content

Commit

Permalink
style(*): add prettier, change eslint to inherit parent .eslintrc opt…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
jdkahn committed Feb 23, 2019
1 parent a00b206 commit ef85e7f
Show file tree
Hide file tree
Showing 7 changed files with 193 additions and 192 deletions.
21 changes: 11 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"env": {
"es6": true,
"node": true
},
"extends": "@alifd/eslint-config-next",
"rules": {
"valid-jsdoc": "off",
"max-statements": "off",
"max-len": "off"
}
"env": {
"es6": true,
"node": true
},
"extends": ["@alifd/eslint-config-next", "prettier"],
"rules": {
"valid-jsdoc": "off",
"max-statements": "off",
"max-len": "off",
"no-unused-vars": 1
}
}
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": true,
"singleQuote": true
}
3 changes: 0 additions & 3 deletions docs/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"extends": [
"@alifd/eslint-config-next"
],
"rules": {
"eol-last": 0,
"key-spacing": 0,
Expand Down
343 changes: 173 additions & 170 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,173 +1,176 @@
{
"name": "@alifd/next",
"version": "1.13.2",
"description": "A configurable component library for web built on React.",
"keywords": [
"fusion",
"fusion design",
"next",
"component",
"ui tookit"
],
"homepage": "https://github.com/alibaba-fusion/next",
"bugs": "https://github.com/alibaba-fusion/next/issues",
"license": "MIT",
"files": [
"dist",
"es",
"lib",
"index-noreset.scss",
"index-with-locales.js",
"index.js",
"index.scss",
"reset.scss",
"variables.scss",
".fusion"
],
"main": "index.js",
"module": "es/index.js",
"typings": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/alibaba-fusion/next.git"
},
"scripts": {
"report-coverage": "codecov",
"dev": "node ./scripts/server/index.js",
"build": "node ./scripts/build/index.js",
"check": "node ./scripts/check/index.js",
"check-sass": "node ./scripts/check/sass.js",
"docs": "node ./scripts/docs/index.js",
"api": "node ./scripts/api.js",
"pack": "node ./scripts/pack.js",
"release": "node ./scripts/release/index.js",
"test": "node --max_old_space_size=8192 ./scripts/test/index.js",
"order-var": "node ./scripts/order-var.js",
"eslint": "eslint --fix '@(src|scripts)/**/*.@(js|jsx)' && eslint --fix 'docs/**/@(demo|theme)/*.@(md)'",
"stylelint": "stylelint --fix 'src/**/*.@(css|scss)'",
"commitmsg": "commitlint -E GIT_PARAMS",
"precommit": "lint-staged",
"changelog": "node ./scripts/changelog.js",
"prepub": "npm run eslint && npm run stylelint && npm run changelog && npm run build && npm run check && npm run docs && npm run pack && npm run pack -- minimize"
},
"lint-staged": {
"@(src|scripts|docs/*/demo)/**/*.@(js|jsx|md)": [
"eslint",
"git add"
"name": "@alifd/next",
"version": "1.13.2",
"description": "A configurable component library for web built on React.",
"keywords": [
"fusion",
"fusion design",
"next",
"component",
"ui tookit"
],
"src/**/*.@(css|scss)": [
"stylelint",
"git add"
]
},
"dependencies": {
"babel-runtime": "^6.26.0",
"classnames": "^2.2.3",
"hoist-non-react-statics": "^2.1.0",
"prop-types": "^15.6.0",
"react-transition-group": "^2.2.1",
"shallow-element-equals": "^1.0.1"
},
"devDependencies": {
"@alifd/api-extractor": "^3.4.0",
"@alifd/babel-preset-next": "^2.0.0",
"@alifd/doc-parser": "^1.0.0",
"@alifd/dts-generator": "^1.0.3",
"@alifd/eslint-config-next": "^2.0.0",
"@alifd/stylelint-config-next": "^1.0.0",
"@commitlint/cli": "^7.0.0",
"@no-repeat/sass-mapper": "^0.0.6",
"@no-repeat/sass-tracker": "^0.0.10",
"@no-repeat/sassdoc-parser": "^0.0.11",
"@octokit/rest": "^15.15.1",
"autoprefixer": "^7.1.4",
"axe-core": "^3.1.2",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.0.0",
"babel-plugin-espower": "^2.3.2",
"babel-plugin-istanbul": "^4.1.5",
"babel-polyfill": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"chalk": "^2.3.2",
"cheerio": "^1.0.0-rc.2",
"chokidar": "^2.0.4",
"chrome-launcher": "^0.10.2",
"co": "^4.6.0",
"console-polyfill": "^0.3.0",
"conventional-changelog": "^2.0.1",
"css-loader": "^0.28.7",
"css-split-webpack-plugin": "^0.2.5",
"ejs": "^2.5.9",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"es5-shim": "^4.5.9",
"es6-promise-polyfill": "^1.2.0",
"eslint": "^4.19.1",
"eslint-plugin-html": "^5.0.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-markdown": "^1.0.0-beta.6",
"eslint-plugin-react": "7.11.1",
"expect.js": "^0.3.1",
"extract-text-webpack-plugin": "^3.0.0",
"fast-sass-loader": "^1.2.5",
"fs-extra": "^5.0.0",
"glob": "^7.1.2",
"highlight.js": "^9.12.0",
"html5shiv": "^3.7.3",
"husky": "^0.14.3",
"inquirer": "^6.1.0",
"jsonp": "^0.2.1",
"karma": "^3.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.26",
"karma-webdriver-launcher": "^1.0.5",
"karma-webpack": "^3.0.5",
"lint-staged": "^7.2.2",
"loader-utils": "^1.1.0",
"lodash": "^4.17.5",
"markdown-it": "^8.4.2",
"md5": "^2.2.1",
"minimist": "^1.2.0",
"mocha": "^3.5.3",
"moment": "^2.20.1",
"node-sass": "4.6.0",
"node-sass-package-importer": "^5.2.0",
"postcss-loader": "^2.0.6",
"postcss-scss": "1.0.2",
"power-assert": "^1.5.0",
"promise-polyfill": "^8.1.0",
"react": "^16.0.0",
"react-axe": "^3.0.2",
"react-copy-to-clipboard": "^5.0.1",
"react-cropper": "^1.0.0",
"react-dev-utils": "^4.2.1",
"react-dom": "^16.0.0",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"redux": "^4.0.0",
"remark": "^9.0.0",
"sass": "^1.15.2",
"sassaby-next": "^3.0.0",
"simulate-event": "^1.4.0",
"sinon": "^5.0.10",
"style-loader": "^0.18.2",
"stylelint": "^9.2.1",
"stylelint-scss": "^3.1.1",
"typescript": "^3.0.1",
"webpack": "^3.0.0",
"webpack-dev-server": "^2.x",
"whatwg-fetch": "^2.0.3"
},
"peerDependencies": {
"moment": "^2.22.1",
"react": "^16.0.0",
"react-dom": "^16.0.0"
},
"publishConfig": {
"access": "public"
}
"homepage": "https://github.com/alibaba-fusion/next",
"bugs": "https://github.com/alibaba-fusion/next/issues",
"license": "MIT",
"files": [
"dist",
"es",
"lib",
"index-noreset.scss",
"index-with-locales.js",
"index.js",
"index.scss",
"reset.scss",
"variables.scss",
".fusion"
],
"main": "index.js",
"module": "es/index.js",
"typings": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/alibaba-fusion/next.git"
},
"scripts": {
"report-coverage": "codecov",
"dev": "node ./scripts/server/index.js",
"build": "node ./scripts/build/index.js",
"check": "node ./scripts/check/index.js",
"check-sass": "node ./scripts/check/sass.js",
"docs": "node ./scripts/docs/index.js",
"api": "node ./scripts/api.js",
"pack": "node ./scripts/pack.js",
"release": "node ./scripts/release/index.js",
"test": "node --max_old_space_size=8192 ./scripts/test/index.js",
"order-var": "node ./scripts/order-var.js",
"eslint": "eslint '@(src|scripts)/**/*.@(js|jsx)' && eslint --fix 'docs/**/@(demo|theme)/*.@(md)'",
"stylelint": "stylelint --fix 'src/**/*.@(css|scss)'",
"commitmsg": "commitlint -E GIT_PARAMS",
"precommit": "lint-staged",
"changelog": "node ./scripts/changelog.js",
"prepub": "npm run eslint && npm run stylelint && npm run changelog && npm run build && npm run check && npm run docs && npm run pack && npm run pack -- minimize"
},
"lint-staged": {
"@(src|scripts|docs/*/demo)/**/*.@(js|jsx|md)": [
"prettier --write",
"eslint",
"git add"
],
"src/**/*.@(css|scss)": [
"stylelint",
"git add"
]
},
"dependencies": {
"babel-runtime": "^6.26.0",
"classnames": "^2.2.3",
"hoist-non-react-statics": "^2.1.0",
"prop-types": "^15.6.0",
"react-transition-group": "^2.2.1",
"shallow-element-equals": "^1.0.1"
},
"devDependencies": {
"@alifd/api-extractor": "^3.4.0",
"@alifd/babel-preset-next": "^2.0.0",
"@alifd/doc-parser": "^1.0.0",
"@alifd/dts-generator": "^1.0.3",
"@alifd/eslint-config-next": "^2.0.0",
"@alifd/stylelint-config-next": "^1.0.0",
"@commitlint/cli": "^7.0.0",
"@no-repeat/sass-mapper": "^0.0.6",
"@no-repeat/sass-tracker": "^0.0.10",
"@no-repeat/sassdoc-parser": "^0.0.11",
"@octokit/rest": "^15.15.1",
"autoprefixer": "^7.1.4",
"axe-core": "^3.1.2",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.0.0",
"babel-plugin-espower": "^2.3.2",
"babel-plugin-istanbul": "^4.1.5",
"babel-polyfill": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"chalk": "^2.3.2",
"cheerio": "^1.0.0-rc.2",
"chokidar": "^2.0.4",
"chrome-launcher": "^0.10.2",
"co": "^4.6.0",
"console-polyfill": "^0.3.0",
"conventional-changelog": "^2.0.1",
"css-loader": "^0.28.7",
"css-split-webpack-plugin": "^0.2.5",
"ejs": "^2.5.9",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"es5-shim": "^4.5.9",
"es6-promise-polyfill": "^1.2.0",
"eslint": "^4.19.1",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-html": "^5.0.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-markdown": "^1.0.0-beta.6",
"eslint-plugin-react": "7.11.1",
"expect.js": "^0.3.1",
"extract-text-webpack-plugin": "^3.0.0",
"fast-sass-loader": "^1.2.5",
"fs-extra": "^5.0.0",
"glob": "^7.1.2",
"highlight.js": "^9.12.0",
"html5shiv": "^3.7.3",
"husky": "^0.14.3",
"inquirer": "^6.1.0",
"jsonp": "^0.2.1",
"karma": "^3.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.26",
"karma-webdriver-launcher": "^1.0.5",
"karma-webpack": "^3.0.5",
"lint-staged": "^7.2.2",
"loader-utils": "^1.1.0",
"lodash": "^4.17.5",
"markdown-it": "^8.4.2",
"md5": "^2.2.1",
"minimist": "^1.2.0",
"mocha": "^3.5.3",
"moment": "^2.20.1",
"node-sass": "4.6.0",
"node-sass-package-importer": "^5.2.0",
"postcss-loader": "^2.0.6",
"postcss-scss": "1.0.2",
"power-assert": "^1.5.0",
"prettier": "1.16.4",
"promise-polyfill": "^8.1.0",
"react": "^16.0.0",
"react-axe": "^3.0.2",
"react-copy-to-clipboard": "^5.0.1",
"react-cropper": "^1.0.0",
"react-dev-utils": "^4.2.1",
"react-dom": "^16.0.0",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"redux": "^4.0.0",
"remark": "^9.0.0",
"sass": "^1.15.2",
"sassaby-next": "^3.0.0",
"simulate-event": "^1.4.0",
"sinon": "^5.0.10",
"style-loader": "^0.18.2",
"stylelint": "^9.2.1",
"stylelint-scss": "^3.1.1",
"typescript": "^3.0.1",
"webpack": "^3.0.0",
"webpack-dev-server": "^2.x",
"whatwg-fetch": "^2.0.3"
},
"peerDependencies": {
"moment": "^2.22.1",
"react": "^16.0.0",
"react-dom": "^16.0.0"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions src/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": [
"@alifd/eslint-config-next"
]
"rules": {
"react/prefer-stateless-function": "off"
}
}
Loading

0 comments on commit ef85e7f

Please sign in to comment.