Last active
August 23, 2022 16:14
-
-
Save forcepusher/735ae80a5715af68846920627e22ad6b to your computer and use it in GitHub Desktop.
Very opinionated Airbnb ESLint config for AssemblyScript.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| // Lights up your code like a Christmas tree, but eliminates bikeshedding. | |
| // Don't forget to use `"strict": true` option in the root tsconfig.json | |
| // You can also enable the `"pedantic": true` option in asconfig.json | |
| // Dependencies: | |
| // "eslint", | |
| // "eslint-config-airbnb-base", | |
| // "eslint-config-airbnb-typescript", | |
| // "eslint-plugin-import", | |
| // "@typescript-eslint/parser", | |
| // "@typescript-eslint/eslint-plugin", | |
| { | |
| "root": true, | |
| "parser": "@typescript-eslint/parser", | |
| "plugins": [ | |
| "@typescript-eslint" | |
| ], | |
| "parserOptions": { | |
| "project": "tsconfig.json" | |
| }, | |
| "extends": [ | |
| "airbnb-base", | |
| "airbnb-typescript/base", | |
| "eslint:recommended", | |
| "plugin:@typescript-eslint/recommended", | |
| "plugin:@typescript-eslint/recommended-requiring-type-checking" | |
| ], | |
| "ignorePatterns": [ | |
| "**/build/**", | |
| "**/dist/**", | |
| "**/vendor/**" | |
| ], | |
| "rules": { | |
| // Too problematic because of AssemblyScript methods like __pin and __unpin. | |
| "no-underscore-dangle": ["off"] | |
| }, | |
| "overrides": [ | |
| { | |
| "files": ["assembly/**"], | |
| "parserOptions": { | |
| "project": "assembly/tsconfig.json" | |
| }, | |
| "rules": { | |
| // Type conversions require an explicit cast in AssemblyScript. | |
| "@typescript-eslint/no-unnecessary-type-assertion": "off", | |
| // Different behavior in AssemblyScript. | |
| // https://www.assemblyscript.org/basics.html#triple-equals | |
| "eqeqeq": "off" | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment