Skip to content

Commit

Permalink
Ensure no extension is defined in .ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
gberaudo committed Aug 28, 2023
1 parent e917a8c commit a97cdc4
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 41 deletions.
92 changes: 51 additions & 41 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,52 @@
{
root: true,
extends: [
'openlayers',
'.eslintrc-es6.yaml'
],
rules: {
no-console: 0,
comma-dangle: 0,
no-extra-boolean-cast: 0,
brace-style: 0,
prefer-template: 0,
no-multiple-empty-lines: 0,
valid-jsdoc: 0,
indent: [2, 2, {
VariableDeclarator: 2,
SwitchCase: 1,
MemberExpression: 2,
FunctionDeclaration: {
parameters: 2,
body: 1
},
FunctionExpression: {
parameters: 2,
body: 1
},
CallExpression: {
arguments: 2
}
root: true
extends:
- openlayers
- .eslintrc-es6.yaml
- plugin:import/recommended
- plugin:import/typescript
settings:
import/resolver:
# You will also need to install and configure the TypeScript resolver
# See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
typescript: true
node: true
rules:
no-console: 0
comma-dangle: 0
no-extra-boolean-cast: 0
brace-style: 0
prefer-template: 0
no-multiple-empty-lines: 0
valid-jsdoc: 0
indent: [2, 2, {
VariableDeclarator: 2,
SwitchCase: 1,
MemberExpression: 2,
FunctionDeclaration: {
parameters: 2,
body: 1
},
FunctionExpression: {
parameters: 2,
body: 1
},
CallExpression: {
arguments: 2
}
}]
},
overrides: [{
"files": [ "examples/*.js" ],
"rules": {
"import/no-unresolved": 0
}
}],
globals: {
webpack: false,
Cesium: false
}
}
overrides:
- files: [ "examples/*.js" ]
rules:
import/no-unresolved: 0
- files: ['*.ts']
rules:
import/extensions: [
"error",
{
"ts": "never",
"js": "always"
}
]
globals:
webpack: false
Cesium: false
60 changes: 60 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"cross-env": "7.0.3",
"eslint": "8.48.0",
"eslint-config-openlayers": "12.0.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-import-resolver-webpack": "0.13.7",
"eslint-plugin-import": "^2.28.0",
"html-loader": "4.2.0",
Expand Down

0 comments on commit a97cdc4

Please sign in to comment.