Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting fix #200

Merged
merged 7 commits into from
Sep 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
version: 2.1

# 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.
# See: https://circleci.com/docs/2.0/orb-intro/
orbs:
node: circleci/node@4.7

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- node/test:
# This is the node version to use for the `cimg/node` tag
# Relevant tags can be found on the CircleCI Developer Hub
# https://circleci.com/developer/images/image/cimg/node
version: '16.10'
# If you are using yarn, change the line below from "npm" to "yarn"
pkg-manager: npm
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ root = true
[*]
indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
Expand Down
12 changes: 10 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
"node": true,
"jest": true
},
"extends": ["airbnb", "plugin:prettier/recommended", "plugin:node/recommended"],
"extends": ["airbnb", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
"prettier/prettier": ["error"],
"no-underscore-dangle": "off",
"no-param-reassign": "off",
"no-console": "warn",
"consistent-return": "warn",
"max-classes-per-file": "off",
"no-bitwise": "warn",
"no-restricted-syntax": "warn",
"no-continue": "warn"
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=crlf
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run format && npm run lint
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run test
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ module.exports = {
printWidth: 120,
tabWidth: 2,
arrowParens: 'always',
endOfLine: 'lf',
};
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ node_js:
after_success:
- npm install -D coveralls
- npm run coverage
- npm run coveralls
- npm run coveralls
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribution Guide
# Contribution Guide

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

## How to setup?

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

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

### Before you start, keep the following things in mind:

- We use ESLint for code linting
- The linter follows [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)
- Go through the folder structure carefully and follow the same
- Go through the format and file conventions used while adding tests (both test case and test files)

## How to pick up an Issue
- Comment on the issue first so that we can assign you the issue.

- Comment on the issue first so that we can assign you the issue.
- If you raise a Pull Request for an issue and the Issue was not assigned to you, your PR will be marked as **Invalid**

## Submittng a Pull Request (PR)

- Add yourself to the assignee section
- Add meaningful heading and description to your PR
- Also mention the issue number in the description using **'#'**, e.g: **#12**
Expand All @@ -30,12 +33,13 @@ This is the most simple project when it comes to contributions, setup, opening i
## Adding your code

- When adding a new problem with a solution

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

- When adding a Unit Test
- Take care of the file name convention
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Find the detailed contents and problem list here: [Table Of Contents](TOC.md)

## Contributors

| Name | Twitter | LinkedIn | Website |
| ----------------------------------------- | ------------------------------------------- | --------------------------------------------- | ------------------------------------------ |
| [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)|
| [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/) | - |
| Name | Twitter | LinkedIn | Website |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------ |
| [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) |
| [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/) | - |

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

Expand Down
Loading