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

1.1.0: Updating to eslint 8 and setting up the full member-ordering rule #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[![RuneJS Discord Server](https://img.shields.io/discord/678751302297059336?label=RuneJS%20Discord&logo=discord)](https://discord.gg/5P74nSh)

[![RuneJS](https://i.imgur.com/QSXNzwC.png)](https://github.com/runejs/)

![RuneJS](https://i.imgur.com/pmkdSfc.png)
# ESLint Config

# @runejs/eslint-config

A standard set of ESLint rules for all RuneJS related projects.
A standard set of ESLint rules for all RuneJS projects.

## Installation

Expand All @@ -25,19 +24,9 @@ Create a `.eslintrc` file in your project's root directory or add an entry for `

```
{
"extends": [ "@runejs/eslint-config" ],
}
```


Don't forget to include your project's specific `parserOptions` in the file:

```diff
{
"extends": [ "@runejs/eslint-config" ],
"extends": [ "@runejs" ],
"parserOptions": {
"project": "./tsconfig.json"
}
}
```

39 changes: 38 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,44 @@ module.exports = {
}
}
],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/member-ordering": [
"error", { "default":
[
// Index signature

// Fields
"static-field", // = ["public-static-field", "protected-static-field", "private-static-field"]
"abstract-field", // = ["public-abstract-field", "protected-abstract-field", "private-abstract-field"]
"instance-field", // = ["public-instance-field", "protected-instance-field", "private-instance-field"]

// Constructors
"constructor",

// Methods
"static-method", // = ["public-static-method", "protected-static-method", "private-static-method"]
"abstract-method", // = ["public-abstract-method", "protected-abstract-method", "private-abstract-method"]
"instance-method", // = ["public-instance-method", "protected-instance-method", "private-instance-method"]

// Getters & Setters
[ "static-get", "static-set" ], // = ["public-static-get", "protected-static-get", "private-static-get"],["public-static-set", "protected-static-set", "private-static-set"]
[ "abstract-get", "abstract-set" ], // = ["public-abstract-get", "protected-abstract-get", "private-abstract-get"],["public-abstract-set", "protected-abstract-set", "private-abstract-set"]
[ "instance-get", "instance-set" ], // = ["public-instance-get", "protected-instance-get", "private-instance-get"],["public-instance-set", "protected-instance-set", "private-instance-set"]
] }
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/keyword-spacing": [
"error",
{
"after": true,
"before": true
}
],
"keyword-spacing": "off",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/quotes": [
"error",
Expand Down
Loading