-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add eslint + prettier configs and format the code
- Loading branch information
1 parent
119e9ed
commit 8ad419f
Showing
22 changed files
with
1,734 additions
and
536 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
coverage | ||
lib | ||
mochawesome-report | ||
test | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
node: true | ||
}, | ||
extends: ['eslint:recommended', 'prettier'], | ||
globals: { | ||
describe: 'readonly', | ||
it: 'readonly', | ||
should: 'readonly', | ||
xit: 'readonly' | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module' | ||
}, | ||
rules: { | ||
'no-control-regex': 'off', | ||
'no-empty': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
coverage | ||
lib | ||
mochawesome-report | ||
types | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"trailingComma": "none", | ||
"tabWidth": 4, | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"endOfLine": "auto" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,44 @@ | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover"> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | ||
<meta name="theme-color" content="#2196f3"> | ||
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap:; img-src * 'self' data: blob:; media-src * 'self' data: blob:; connect-src * 'self' data: blob:"> | ||
<meta name="format-detection" content="telephone=no"> | ||
<meta name="msapplication-tap-highlight" content="no"> | ||
<!-- Title --> | ||
<title>Data Grid</title> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover" | ||
/> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> | ||
<meta name="theme-color" content="#2196f3" /> | ||
<meta | ||
http-equiv="Content-Security-Policy" | ||
content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap:; img-src * 'self' data: blob:; media-src * 'self' data: blob:; connect-src * 'self' data: blob:" | ||
/> | ||
<meta name="format-detection" content="telephone=no" /> | ||
<meta name="msapplication-tap-highlight" content="no" /> | ||
<!-- Title --> | ||
<title>Data Grid</title> | ||
|
||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
<script src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script> | ||
<script type="text/javascript" src="http://localhost:3005/dist/index.js"></script> | ||
</head> | ||
<body> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" /> | ||
<script src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script> | ||
<script type="text/javascript" src="http://localhost:3005/dist/index.js"></script> | ||
</head> | ||
<body> | ||
<!-- App root element --> | ||
<div id="root" class="application"></div> | ||
|
||
<!-- App root element --> | ||
<div id="root" class="application"></div> | ||
|
||
|
||
|
||
<script> | ||
Datagrid(root, { | ||
data: [ | ||
{ id: 1, person: 'Maria Dasdores', age: 28 }, | ||
{ id: 2, person: 'Carlos Silva', age: 33 }, | ||
{ id: 3, person: 'Antonio Souza', age: 25 }, | ||
{ id: 4, person: 'Ana Luiza', age: 19 }, | ||
], | ||
columns: [ | ||
{ name: 'person', headerName: 'Name' }, | ||
{ name: 'age', headerName: 'Age', align: 'center' }, | ||
], | ||
search: true, | ||
}) | ||
</script> | ||
|
||
</body> | ||
<script> | ||
Datagrid(root, { | ||
data: [ | ||
{ id: 1, person: 'Maria Dasdores', age: 28 }, | ||
{ id: 2, person: 'Carlos Silva', age: 33 }, | ||
{ id: 3, person: 'Antonio Souza', age: 25 }, | ||
{ id: 4, person: 'Ana Luiza', age: 19 } | ||
], | ||
columns: [ | ||
{ name: 'person', headerName: 'Name' }, | ||
{ name: 'age', headerName: 'Age', align: 'center' } | ||
], | ||
search: true | ||
}) | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#! /usr/bin/env node | ||
|
||
require('jsdom-global')(undefined, { url: 'https://localhost' }); | ||
const lemonade = require("lemonadejs"); | ||
const Datagrid = require("./src/datagrid.js"); | ||
require('jsdom-global')(undefined, { url: 'https://localhost' }) | ||
const lemonade = require('lemonadejs') | ||
const Datagrid = require('./src/datagrid.js') | ||
|
||
global.lemonade = lemonade; | ||
global.Datagrid = Datagrid; | ||
global.root = document.createElement('div'); | ||
global.root.style.width = '100%'; | ||
global.root.style.height = '100%'; | ||
document.body.appendChild(global.root); | ||
global.lemonade = lemonade | ||
global.Datagrid = Datagrid | ||
global.root = document.createElement('div') | ||
global.root.style.width = '100%' | ||
global.root.style.height = '100%' | ||
document.body.appendChild(global.root) | ||
|
||
exports.mochaHooks = { | ||
afterEach(done) { | ||
// destroy datagrid component | ||
done(); | ||
}, | ||
}; | ||
done() | ||
} | ||
} |
Oops, something went wrong.