Skip to content

Commit

Permalink
Added eslint tool (#135)
Browse files Browse the repository at this point in the history
* Added a "Remember to add a good commit message"

* Added eslint

* Added eslint tool

* Changes made

---------

Co-authored-by: Aniket Shitole <[email protected]>
Co-authored-by: Priyankar Pal <[email protected]>
  • Loading branch information
3 people authored Apr 3, 2023
1 parent 712d3b8 commit 4f5fa6e
Show file tree
Hide file tree
Showing 5 changed files with 12,265 additions and 833 deletions.
74 changes: 74 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* eslint-disable max-len */
module.exports = {
env: {
browser: true,
es2021: true
},
extends: [
'plugin:react/recommended',
'standard'
],
overrides: [
{
files: ['*.md'],
rules: {
'commit-convention/commit-convention': 'off'
}
}
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: [
'react'
],
rules: {
// Disallow unused variables
'no-unused-vars': 'error',

// Enforce a maximum line length
'max-len': ['warn', { code: 80 }],

// Enforce consistent indentation
indent: ['error', 2],

// Enforce the use of semicolons
semi: ['error', 'always'],

// Require single quotes for strings
quotes: ['error', 'single'],

// Require curly braces for all control statements
curly: ['error', 'all'],

// Disallow the use of `var` to declare variables
'no-var': 'error',

// Require conventional commit messages
'commit-convention/commit-convention': [
'error',
{
'type-enum': [
'feat', // A new feature
'fix', // A bug fix
'docs', // Documentation only changes
'style', // Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
'refactor', // A code change that neither fixes a bug nor adds a feature
'perf', // A code change that improves performance
'test', // Adding missing tests or correcting existing tests
'chore', // Changes to the build process or auxiliary tools and libraries such as documentation generation
'revert', // Revert to a commit
'build' // Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
],
'type-case': 'lowerCase',
'type-empty': false,
'subject-empty': false,
'subject-full-stop': false,
'header-max-length': 72,
'body-max-line-length': 80,
'footer-max-line-length': 80
}
]
}
};
Loading

1 comment on commit 4f5fa6e

@vercel
Copy link

@vercel vercel bot commented on 4f5fa6e Apr 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

projectshut – ./

projectshut-priyankarpal.vercel.app
projectshut-git-main-priyankarpal.vercel.app
projectshut.vercel.app

Please sign in to comment.