Skip to content

Commit

Permalink
chore(*): build and editor config
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriytat committed Oct 3, 2017
1 parent 5a912e4 commit 2fcb4f5
Show file tree
Hide file tree
Showing 16 changed files with 301 additions and 236 deletions.
39 changes: 21 additions & 18 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
{
"presets": [
"es2015",
"stage-3"
],
"plugins": [
"transform-class-properties"
],
"env": {
"test": {
"plugins": [
["istanbul", {
"exclude": [
"tests",
"test-utils"
]
}]
]
"presets": [
"es2015",
"stage-3"
],
"plugins": [
"transform-class-properties"
],
"env": {
"test": {
"plugins": [
[
"istanbul",
{
"exclude": [
"tests",
"test-utils"
]
}
]
]
}
}
}
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
max_line_length = null
81 changes: 44 additions & 37 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
{
"parser": "babel-eslint",
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"rules": {
"indent": [
"error",
4
"parser": "babel-eslint",
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"no-console": [
"error",
{
"allow": ["warn", "error"]
}
],
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }]
},
"globals": {
"module": true,
"window": true,
"XMLHttpRequest": true,
"document": true,
"FormData": true,
"FileList": true,
"describe": true,
"it": true,
"assert": true
}
"rules": {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"no-console": [
"error",
{
"allow": [
"warn",
"error"
]
}
],
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/anchor-is-valid": [
"warn",
{
"aspects": [
"invalidHref"
]
}
]
},
"env": {
"browser": true,
"node": true,
"jasmine": true
}
}
28 changes: 14 additions & 14 deletions esdoc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"source": "./src",
"destination": "./docs",
"plugins": [
{
"name": "esdoc-standard-plugin"
},
{
"name": "esdoc-ecmascript-proposal-plugin",
"option": {
"all": true
}
}
]
}
"source": "./src",
"destination": "./docs",
"plugins": [
{
"name": "esdoc-standard-plugin"
},
{
"name": "esdoc-ecmascript-proposal-plugin",
"option": {
"all": true
}
}
]
}
28 changes: 14 additions & 14 deletions example/ajax.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"validationErrors": {
"base": [
"Form validation error",
"Error 145"
],
"name": [
"Name is required",
"Another error"
],
"email": [
"E-mail is not valid"
]
}
}
"validationErrors": {
"base": [
"Form validation error",
"Error 145"
],
"name": [
"Name is required",
"Another error"
],
"email": [
"E-mail is not valid"
]
}
}
4 changes: 2 additions & 2 deletions example/ajaxSuccess.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"redirect": "/success.php"
}
"redirect": "/success.php"
}
12 changes: 4 additions & 8 deletions example/bootstrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@

<head>
<meta charset="UTF-8">
<title></title>
<title>Jedi Validate - Lightweight form validation component.</title>
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css"/>
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap-theme.min.css"/>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
</head>

<body>
Expand Down Expand Up @@ -271,9 +267,9 @@ <h1>Jedi Validate
}
},
callbacks: {
success: function(response) {
success: function (response) {
},
error: function(errors) {
error: function (errors) {
}
}
};
Expand Down Expand Up @@ -304,7 +300,7 @@ <h1>Jedi Validate
},
rules: {
phone: {
required: [true, function(oldData) {
required: [true, function (oldData) {
const newData = validator.collect('checkbox'); // manual data recollect for concrete field
return !!newData['checkbox'];
}],
Expand Down
30 changes: 16 additions & 14 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=759670
// for the documentation about the jsconfig.json format
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
"bower_components",
"jspm_packages",
"tmp",
"temp"
]
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
"bower_components",
"jspm_packages",
"tmp",
"temp",
"cache",
"coverage",
"dist",
"docs"
]
}
Loading

0 comments on commit 2fcb4f5

Please sign in to comment.