Skip to content

Commit 03b6553

Browse files
authored
Merge pull request knaxus#200 from knaxus/linting-fix
Linting fix
2 parents 92a6b5a + 9d453db commit 03b6553

File tree

68 files changed

+13161
-4549
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+13161
-4549
lines changed

.circleci/config.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
2+
version: 2.1
3+
4+
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
5+
# See: https://circleci.com/docs/2.0/orb-intro/
6+
orbs:
7+
node: circleci/node@4.7
8+
9+
# Invoke jobs via workflows
10+
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
11+
workflows:
12+
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
13+
# Inside the workflow, you define the jobs you want to run.
14+
jobs:
15+
- node/test:
16+
# This is the node version to use for the `cimg/node` tag
17+
# Relevant tags can be found on the CircleCI Developer Hub
18+
# https://circleci.com/developer/images/image/cimg/node
19+
version: '16.10'
20+
# If you are using yarn, change the line below from "npm" to "yarn"
21+
pkg-manager: npm

.editorconfig

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ root = true
33
[*]
44
indent_style = space
55
indent_size = 2
6-
76
end_of_line = lf
87
charset = utf-8
98
trim_trailing_whitespace = true

.eslintrc.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@
33
"node": true,
44
"jest": true
55
},
6-
"extends": ["airbnb", "plugin:prettier/recommended", "plugin:node/recommended"],
6+
"extends": ["airbnb", "prettier"],
77
"plugins": ["prettier"],
88
"rules": {
9-
"prettier/prettier": "error"
9+
"prettier/prettier": ["error"],
10+
"no-underscore-dangle": "off",
11+
"no-param-reassign": "off",
12+
"no-console": "warn",
13+
"consistent-return": "warn",
14+
"max-classes-per-file": "off",
15+
"no-bitwise": "warn",
16+
"no-restricted-syntax": "warn",
17+
"no-continue": "warn"
1018
}
1119
}

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=crlf

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run format && npm run lint

.husky/pre-push

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run test

.prettierrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ module.exports = {
55
printWidth: 120,
66
tabWidth: 2,
77
arrowParens: 'always',
8+
endOfLine: 'lf',
89
};

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ node_js:
44
after_success:
55
- npm install -D coveralls
66
- npm run coverage
7-
- npm run coveralls
7+
- npm run coveralls

CONTRIBUTING.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contribution Guide
1+
# Contribution Guide
22

3-
Thanks for taking interest and I appreciate your efforts towards making this project even better.
3+
Thanks for taking interest and I appreciate your efforts towards making this project even better.
44

55
## How to setup?
66

@@ -9,19 +9,22 @@ This is the most simple project when it comes to contributions, setup, opening i
99
- Clone the repo using the command `git clone git@github.com:knaxus/problem-solving-javascript.git`<sup>1</sup>
1010
- Install the packages to get support for linter using `npm install`
1111

12-
1: If you do not have **ssh** setup for github, while cloning go with **https**
12+
1: If you do not have **ssh** setup for github, while cloning go with **https**
1313

1414
### Before you start, keep the following things in mind:
15+
1516
- We use ESLint for code linting
1617
- The linter follows [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)
1718
- Go through the folder structure carefully and follow the same
1819
- Go through the format and file conventions used while adding tests (both test case and test files)
1920

2021
## How to pick up an Issue
21-
- Comment on the issue first so that we can assign you the issue.
22+
23+
- Comment on the issue first so that we can assign you the issue.
2224
- If you raise a Pull Request for an issue and the Issue was not assigned to you, your PR will be marked as **Invalid**
2325

2426
## Submittng a Pull Request (PR)
27+
2528
- Add yourself to the assignee section
2629
- Add meaningful heading and description to your PR
2730
- Also mention the issue number in the description using **'#'**, e.g: **#12**
@@ -30,12 +33,13 @@ This is the most simple project when it comes to contributions, setup, opening i
3033
## Adding your code
3134

3235
- When adding a new problem with a solution
36+
3337
- Take care of the filename convention (Very Important)
3438
- A problem statement should be there and support it with some examples
3539
- Make sure you've added the **Run Time Complexity** of your solution
3640
- Please take care of the segregation of the Problems as per the given Folder Structure
3741
- It's great if you can add the Unit Tests to verify your solutions as well
38-
- Do not forget to update **[TOC.md](TOC.md)** with your new problem or data structure
42+
- Do not forget to update **[TOC.md](TOC.md)** with your new problem or data structure
3943

4044
- When adding a Unit Test
4145
- Take care of the file name convention

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ Find the detailed contents and problem list here: [Table Of Contents](TOC.md)
2727

2828
## Contributors
2929

30-
| Name | Twitter | LinkedIn | Website |
31-
| ----------------------------------------- | ------------------------------------------- | --------------------------------------------- | ------------------------------------------ |
32-
| [Ashok Dey](https://github.com/ashokdey) |<a class="header-badge" target="_blank" href="https://twitter.com/intent/follow?screen_name=ashokdey_">![Twitter Follow](https://img.shields.io/twitter/follow/ashokdey_?label=%40ashokdey_&style=social) </a> | [Ashok Dey](https://linkedin.com/in/ashokdey) | [https://ashokdey.in](https://ashokdey.in)|
33-
| [Ashu Deshwal](https://github.com/TheSTL) | <a class="header-badge" target="_blank" href="https://twitter.com/follow?screen_name=_TheSTL_">![Twitter Follow](https://img.shields.io/twitter/follow/_TheSTL_?label=%40_TheSTL__&style=social) </a>| [Ashu Deshwal](https://www.linkedin.com/in/ashu-deshwal/) | - |
30+
| Name | Twitter | LinkedIn | Website |
31+
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------ |
32+
| [Ashok Dey](https://github.com/ashokdey) | <a class="header-badge" target="_blank" href="https://twitter.com/intent/follow?screen_name=ashokdey_">![Twitter Follow](https://img.shields.io/twitter/follow/ashokdey_?label=%40ashokdey_&style=social) </a> | [Ashok Dey](https://linkedin.com/in/ashokdey) | [https://ashokdey.in](https://ashokdey.in) |
33+
| [Ashu Deshwal](https://github.com/TheSTL) | <a class="header-badge" target="_blank" href="https://twitter.com/follow?screen_name=_TheSTL_">![Twitter Follow](https://img.shields.io/twitter/follow/_TheSTL_?label=%40_TheSTL__&style=social) </a> | [Ashu Deshwal](https://www.linkedin.com/in/ashu-deshwal/) | - |
3434

3535
[Detailed list of contributors](https://github.com/knaxus/problem-solving-javascript/graphs/contributors)
3636

0 commit comments

Comments
 (0)