Skip to content

Commit deb336c

Browse files
committed
add more files
1 parent 56b4833 commit deb336c

File tree

11 files changed

+3591
-1
lines changed

11 files changed

+3591
-1
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/*
2+
coverage/*
3+

.eslintrc.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es6": true,
6+
"node": true,
7+
"jest": true
8+
},
9+
"extends": "airbnb-base",
10+
"parserOptions": {
11+
"ecmaFeatures": {
12+
"jsx": false
13+
},
14+
"sourceType": "module"
15+
},
16+
"rules": {
17+
"no-console": "off",
18+
"no-const-assign": "warn",
19+
"no-this-before-super": "warn",
20+
"no-undef": "warn",
21+
"no-unreachable": "warn",
22+
"no-unused-vars": "warn",
23+
"no-unused-expressions": 0,
24+
"constructor-super": "warn",
25+
"valid-typeof": "warn",
26+
"semi": 0,
27+
"arrow-parens": 0,
28+
"class-methods-use-this": [0],
29+
"indent": ["error", 2, {
30+
"SwitchCase": 1
31+
}],
32+
"no-class-assign": 0,
33+
"import/extensions": [0],
34+
"no-underscore-dangle": 0,
35+
"camelcase": 0,
36+
"no-plusplus": ["error", {
37+
"allowForLoopAfterthoughts": true
38+
}],
39+
"radix": [0],
40+
"no-trailing-spaces": ["error", {
41+
"skipBlankLines": true
42+
}],
43+
"consistent-return": 0,
44+
"object-property-newline": 0,
45+
"space-before-function-paren": 0,
46+
"import/no-extraneous-dependencies": 0,
47+
"no-useless-escape": 0
48+
}
49+
}

.gitignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
################################################
2+
############### .gitignore ##################
3+
4+
5+
################################################
6+
# Local Configuration
7+
#
8+
# Explicitly ignore files which contain:
9+
#
10+
# 1. Sensitive information you'd rather not push to
11+
# your git repository.
12+
# e.g., your personal API keys or passwords.
13+
#
14+
# 2. Environment-specific configuration
15+
# Basically, anything that would be annoying
16+
# to have to change every time you do a
17+
# `git pull`
18+
# e.g., your local development database, or
19+
# the S3 bucket you're using for file uploads
20+
# development.
21+
#
22+
################################################
23+
24+
config/local.js
25+
26+
node_modules
27+
28+
.tmp
29+
dump.rdb
30+
31+
lib-cov
32+
*.seed
33+
*.log
34+
*.out
35+
*.pid
36+
npm-debug.log
37+
38+
39+
*~
40+
*#
41+
.DS_STORE
42+
.netbeans
43+
nbproject
44+
.idea
45+
.node_history
46+
47+
48+
## vscode files.
49+
.vscode/*
50+
51+
## istanbul coverage files.
52+
coverage
53+
54+
## codeship aws deployment files
55+
codeship.aes
56+
deployment-env
57+
58+
# vim swap file
59+
*.swp
60+
*.swo

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,15 @@
55
"main": "index.js",
66
"repository": "https://github.com/92hackers/dive-into-source",
77
"author": "92hackers",
8-
"license": "MIT"
8+
"license": "MIT",
9+
"scripts": {
10+
"test": "jest",
11+
"lint": "eslint ."
12+
},
13+
"devDependencies": {
14+
"eslint": "^7.32.0",
15+
"eslint-config-airbnb-base": "^14.2.1",
16+
"eslint-plugin-import": "^2.24.2",
17+
"jest": "^27.1.1"
18+
}
919
}

packages/engine/file.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Process files
3+
*
4+
*/
5+
6+
const fsPromises = require('fs').promises
7+
8+
const func = () => console.log(awjifeajwief)

packages/engine/language.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* Handle languages
3+
*/
4+
5+
class Language {
6+
constructor() {
7+
console.log('Languages')
8+
this.languages = []
9+
}
10+
11+
register(languages) {
12+
console.log(languages)
13+
}
14+
}
15+
16+
module.exports = Language
File renamed without changes.
File renamed without changes.

packages/engine/sum.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function sum(a, b) {
2+
return a + b;
3+
}
4+
5+
module.exports = sum;

packages/engine/tests/sum.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const sum = require('../sum');
2+
3+
test('adds 1 + 2 to equal 3', () => {
4+
expect(sum(1, 2)).toBe(3);
5+
});

0 commit comments

Comments
 (0)