mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-03-17 00:51:04 +08:00
Customize eslint, config
This commit is contained in:
parent
042ba7fc5c
commit
7fd757cd02
1
.eslintignore
Normal file
1
.eslintignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
build/*
|
34
.eslintrc.json
Normal file
34
.eslintrc.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"parser": "babel-eslint",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 6,
|
||||||
|
"sourceType": "module",
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"jsx": true,
|
||||||
|
"modules": true,
|
||||||
|
"experimentalObjectRestSpread": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"react"
|
||||||
|
],
|
||||||
|
"extends": ["eslint:recommended", "plugin:react/recommended"],
|
||||||
|
"rules": {
|
||||||
|
"comma-dangle": 0,
|
||||||
|
"no-unused-vars": "warn",
|
||||||
|
"no-unexpected-multiline": "warn",
|
||||||
|
"prefer-const": "warn"
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"react": {
|
||||||
|
"pragma": "React",
|
||||||
|
"version": "15.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"node": true,
|
||||||
|
"jasmine": true,
|
||||||
|
"jest": true
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,3 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const isWsl = require('is-wsl');
|
const isWsl = require('is-wsl');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
@ -13,9 +11,7 @@ const TerserPlugin = require('terser-webpack-plugin');
|
|||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||||
const safePostCssParser = require('postcss-safe-parser');
|
const safePostCssParser = require('postcss-safe-parser');
|
||||||
const ManifestPlugin = require('webpack-manifest-plugin');
|
|
||||||
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
|
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
|
||||||
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
|
|
||||||
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
|
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
|
||||||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
||||||
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
|
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
|
||||||
@ -28,10 +24,7 @@ const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
|
|||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const getPackageJson = require('./getPackageJson');
|
const getPackageJson = require('./getPackageJson');
|
||||||
const PrettierPlugin = require("prettier-webpack-plugin");
|
const PrettierPlugin = require("prettier-webpack-plugin");
|
||||||
const eslint = require('eslint');
|
|
||||||
|
|
||||||
const postcssNormalize = require('postcss-normalize');
|
const postcssNormalize = require('postcss-normalize');
|
||||||
|
|
||||||
const appPackageJson = require(paths.appPackageJson);
|
const appPackageJson = require(paths.appPackageJson);
|
||||||
|
|
||||||
// Source maps are resource heavy and can cause out of memory issue for large source files.
|
// Source maps are resource heavy and can cause out of memory issue for large source files.
|
||||||
@ -65,7 +58,7 @@ const banner = `
|
|||||||
${name} v${version}
|
${name} v${version}
|
||||||
${repository.url}
|
${repository.url}
|
||||||
|
|
||||||
Copyright (c) ${author.replace(/ *\<[^)]*\> */g, " ")}
|
Copyright (c) ${author.replace(/ *<[^)]*> */g, " ")}
|
||||||
|
|
||||||
This source code is licensed under the ${license} license found in the
|
This source code is licensed under the ${license} license found in the
|
||||||
LICENSE file in the root directory of this source tree.
|
LICENSE file in the root directory of this source tree.
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
"@svgr/webpack": "5.1.0",
|
"@svgr/webpack": "5.1.0",
|
||||||
"@typescript-eslint/eslint-plugin": "1.13.0",
|
"@typescript-eslint/eslint-plugin": "1.13.0",
|
||||||
"@typescript-eslint/parser": "1.13.0",
|
"@typescript-eslint/parser": "1.13.0",
|
||||||
"babel-eslint": "10.0.3",
|
"babel-eslint": "^10.0.3",
|
||||||
"babel-jest": "^25.1.0",
|
"babel-jest": "^25.1.0",
|
||||||
"babel-loader": "8.0.6",
|
"babel-loader": "8.0.6",
|
||||||
"babel-plugin-named-asset-import": "^0.3.6",
|
"babel-plugin-named-asset-import": "^0.3.6",
|
||||||
@ -78,13 +78,13 @@
|
|||||||
"mini-css-extract-plugin": "0.9.0",
|
"mini-css-extract-plugin": "0.9.0",
|
||||||
"optimize-css-assets-webpack-plugin": "5.0.3",
|
"optimize-css-assets-webpack-plugin": "5.0.3",
|
||||||
"pnp-webpack-plugin": "1.6.0",
|
"pnp-webpack-plugin": "1.6.0",
|
||||||
"prettier": "^1.19.1",
|
|
||||||
"prettier-webpack-plugin": "^1.2.0",
|
|
||||||
"postcss-flexbugs-fixes": "4.2.0",
|
"postcss-flexbugs-fixes": "4.2.0",
|
||||||
"postcss-loader": "3.0.0",
|
"postcss-loader": "3.0.0",
|
||||||
"postcss-normalize": "8.0.1",
|
"postcss-normalize": "8.0.1",
|
||||||
"postcss-preset-env": "6.7.0",
|
"postcss-preset-env": "6.7.0",
|
||||||
"postcss-safe-parser": "4.0.1",
|
"postcss-safe-parser": "4.0.1",
|
||||||
|
"prettier": "^1.19.1",
|
||||||
|
"prettier-webpack-plugin": "^1.2.0",
|
||||||
"react": "^16.12.0",
|
"react": "^16.12.0",
|
||||||
"react-app-polyfill": "^1.0.6",
|
"react-app-polyfill": "^1.0.6",
|
||||||
"react-dev-utils": "^10.1.0",
|
"react-dev-utils": "^10.1.0",
|
||||||
@ -96,7 +96,7 @@
|
|||||||
"style-loader": "1.1.3",
|
"style-loader": "1.1.3",
|
||||||
"terser-webpack-plugin": "2.3.4",
|
"terser-webpack-plugin": "2.3.4",
|
||||||
"ts-pnp": "1.1.5",
|
"ts-pnp": "1.1.5",
|
||||||
"uglifyjs-webpack-plugin": "^2.1.2",
|
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||||
"url-loader": "3.0.0",
|
"url-loader": "3.0.0",
|
||||||
"webpack": "4.41.5",
|
"webpack": "4.41.5",
|
||||||
"webpack-dev-server": "3.10.2",
|
"webpack-dev-server": "3.10.2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user