mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
The goal of this MR is to unobtrusively allow the usage of `<script type="py">`, `<script type="pyscript">` or `<script type="py-script">` tags instead of `<py-script>` for all those case where the layout in custom elements get parsed and breaks users' expectations (including our SVG based tests).
49 lines
1.6 KiB
JavaScript
49 lines
1.6 KiB
JavaScript
module.exports = {
|
|
parser: '@typescript-eslint/parser',
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
],
|
|
parserOptions: {
|
|
ecmaVersion: 2020,
|
|
sourceType: 'module',
|
|
tsconfigRootDir: __dirname,
|
|
project: ['./tsconfig.json'],
|
|
},
|
|
env: {
|
|
es6: true,
|
|
browser: true,
|
|
},
|
|
plugins: ['@typescript-eslint'],
|
|
ignorePatterns: ['node_modules', 'src/interpreter_worker/*'],
|
|
rules: {
|
|
// ts-ignore is already an explicit override, no need to have a second lint
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
|
|
// any related lints
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
|
|
// other rules
|
|
'no-prototype-builtins': 'error',
|
|
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
|
|
'@typescript-eslint/no-floating-promises': 'error',
|
|
'@typescript-eslint/restrict-plus-operands': 'error',
|
|
'@typescript-eslint/no-empty-function': 'error',
|
|
'@typescript-eslint/restrict-template-expressions': ['error', { allowBoolean: true }],
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['src/components/pyscript.ts'],
|
|
rules: {
|
|
'@typescript-eslint/unbound-method': 'off',
|
|
},
|
|
},
|
|
],
|
|
};
|