Skip to content

Commit

Permalink
Align config with patternslib
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Sep 30, 2020
1 parent 5bec97b commit 50e28bb
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 27 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[*]
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[*.js]
indent_size = 4

[{*.css,*.scss,*.xml,*.html}]
indent_size = 2
27 changes: 27 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
extends: ["eslint:recommended", "prettier"],
root: true,
env: {
es6: "true",
browser: true,
node: true,
jest: true,
},
parser: "babel-eslint",
ignorePatterns: [
"src/lib/depends_parse.js",
"src/pat/calendar/moment-timezone-with-data-2010-2020.js",
],
rules: {
"no-debugger": 1,
"no-duplicate-imports": 1,
// Do keep due avoid unintendet consequences.
"no-alert": 0,
"no-control-regex": 0,
"no-self-assign": 0,
"no-useless-escape": 0,
},
globals: {
spyOn: true, // eventually replace with jest.spyOn and then fix a ton of test failures.
},
};
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
node_modules/
style/
stats.json
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"quoteProps": "consistent"
}
12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: [
[
"@babel/preset-env",
{
useBuiltIns: "entry",
corejs: 3,
},
],
],
plugins: ["@babel/plugin-proposal-optional-chaining"],
};
36 changes: 9 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
"patternslib": "https://github.com/Patternslib/Patterns#master"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
"@babel/preset-env": "^7.9.6",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"core-js": "3",
"eslint": "^7.0.0",
"jquery": "^3.5.0",
"underscore": "^1.9.1",
"eslint-config-prettier": "^6.11.0",
"prettier": "^2.1.2",
"regenerator-runtime": "^0.13.5",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
Expand All @@ -33,31 +35,11 @@
"start": "webpack-dev-server --config webpack.config.js --open --env.NODE_ENV=development",
"build": "webpack --config webpack.config.js --env.NODE_ENV=production"
},
"eslintConfig": {
"root": true,
"env": {
"browser": true
},
"parser": "babel-eslint"
},
"babel": {
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"corejs": 3
}
]
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
]
},
"browserslist": [
">0.2%",
"ie >= 11",
"not dead"
],
"maintainers": [
{
"name": "Syslab.com GmbH",
Expand Down

0 comments on commit 50e28bb

Please sign in to comment.